home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / par150o2.zip / Makefile.os2 < prev    next >
Makefile  |  1998-10-23  |  3KB  |  118 lines

  1. # *********************
  2. # * protoMakefile     *
  3. # * for Par 1.50      *
  4. # * Copyright 1996 by *
  5. # * Adam M. Costello  *
  6. # *********************
  7.  
  8.  
  9. #####
  10. ##### Instructions
  11. #####
  12.  
  13. # If you have no make command (or equivalent), you can easily tell by
  14. # looking at this file what make would do.  It would compile each .c
  15. # file into a .o file, then link all the .o files into the executable
  16. # par.  You can do this manually.  Then you should go look for a version
  17. # of make for your system, since it will come in handy in the future.
  18.  
  19. # If you do have make, you can either copy this file to Makefile, edit
  20. # the definitions of CC, LINK1, LINK2, RM, JUNK, O, and E, and then run
  21. # make; or, better yet, create a short script which looks something
  22. # like:
  23. #
  24. # #!/bin/sh
  25. # make -f protoMakefile CC="cc -c" LINK1="cc" LINK2="-o" RM="rm" JUNK="" $*
  26. #
  27. # (Alter this to use commands and values appropriate for your compiler
  28. # and shell).  The advantage of the second method is that the script
  29. # will probably work on the next release of Par.
  30.  
  31. #####
  32. ##### Configuration
  33. #####
  34.  
  35. # Define CC so that the command
  36. #
  37. # $(CC) foo.c
  38. #
  39. # compiles the ANSI C source file "foo.c" into the object file "foo.o".
  40. # You may assume that foo.c uses no floating point math.
  41. #
  42. # If your operating system or your compiler's exit() function
  43. # automatically frees all memory allocated by malloc() when a process
  44. # terminates, then you can choose to trade away space efficiency for
  45. # time efficiency by defining DONTFREE.
  46. #
  47. # Example (for Solaris 2.x with SPARCompiler C):
  48. # CC = cc -c -O -s -Xc -DDONTFREE
  49.  
  50. # CC = cc -c
  51. CC = gcc -c -O -s -Wall
  52.  
  53. # Define LINK1 and LINK2 so that the command
  54. #
  55. # $(LINK1) foo1.o foo2.o foo3.o $(LINK2) foo
  56. #
  57. # links the object files "foo1.o", "foo2.o", "foo3.o" into the
  58. # executable file "foo".  You may assume that none of the .o files use
  59. # floating point math.
  60. #
  61. # Example (for Solaris 2.x with SPARCompiler C):
  62. # LINK1 = cc -s
  63. # LINK2 = -o
  64.  
  65. LINK1 = gcc -s -O
  66. LINK2 = -o
  67.  
  68. # Define RM so that the command
  69. #
  70. # $(RM) foo1 foo2 foo3
  71. #
  72. # removes the files "foo1", "foo2", and "foo3", and preferably doesn't
  73. # complain if they don't exist.
  74.  
  75. RM = rm -f
  76.  
  77. # Define JUNK to be a list of additional files, other than par and
  78. # $(OBJS), that you want to be removed by "make clean".
  79.  
  80. JUNK =
  81.  
  82. # Define O to be the usual suffix for object files.
  83.  
  84. O = .o
  85.  
  86. # Define E to be the usual suffix for executable files.
  87.  
  88. # E =
  89. E = .exe
  90.  
  91. #####
  92. ##### Guts (you shouldn't need to touch this part)
  93. #####
  94.  
  95. OBJS = buffer$O charset$O errmsg$O par$O reformat$O
  96.  
  97. .c$O:
  98.     $(CC) $<
  99.  
  100. par$E: $(OBJS)
  101.     $(LINK1) $(OBJS) $(LINK2) par$E
  102.  
  103. buffer$O: buffer.c buffer.h errmsg.h
  104.  
  105. charset$O: charset.c charset.h errmsg.h buffer.h
  106.  
  107. errmsg$O: errmsg.c errmsg.h
  108.  
  109. par$O: par.c charset.h errmsg.h buffer.h reformat.h
  110.  
  111. reformat$O: reformat.c reformat.h errmsg.h buffer.h
  112.  
  113. clean:
  114.     $(RM) $(OBJS) $(JUNK)
  115.  
  116. xclean: clean
  117.     $(RM) par$E
  118.