home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / par150o2.zip / protoMakefile < prev    next >
Makefile  |  1996-01-21  |  3KB  |  113 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.  
  52. # Define LINK1 and LINK2 so that the command
  53. #
  54. # $(LINK1) foo1.o foo2.o foo3.o $(LINK2) foo
  55. #
  56. # links the object files "foo1.o", "foo2.o", "foo3.o" into the
  57. # executable file "foo".  You may assume that none of the .o files use
  58. # floating point math.
  59. #
  60. # Example (for Solaris 2.x with SPARCompiler C):
  61. # LINK1 = cc -s
  62. # LINK2 = -o
  63.  
  64. LINK1 = cc
  65. LINK2 = -o
  66.  
  67. # Define RM so that the command
  68. #
  69. # $(RM) foo1 foo2 foo3
  70. #
  71. # removes the files "foo1", "foo2", and "foo3", and preferably doesn't
  72. # complain if they don't exist.
  73.  
  74. RM = rm -f
  75.  
  76. # Define JUNK to be a list of additional files, other than par and
  77. # $(OBJS), that you want to be removed by "make clean".
  78.  
  79. JUNK =
  80.  
  81. # Define O to be the usual suffix for object files.
  82.  
  83. O = .o
  84.  
  85. # Define E to be the usual suffix for executable files.
  86.  
  87. E =
  88.  
  89. #####
  90. ##### Guts (you shouldn't need to touch this part)
  91. #####
  92.  
  93. OBJS = buffer$O charset$O errmsg$O par$O reformat$O
  94.  
  95. .c$O:
  96.     $(CC) $<
  97.  
  98. par$E: $(OBJS)
  99.     $(LINK1) $(OBJS) $(LINK2) par$E
  100.  
  101. buffer$O: buffer.c buffer.h errmsg.h
  102.  
  103. charset$O: charset.c charset.h errmsg.h buffer.h
  104.  
  105. errmsg$O: errmsg.c errmsg.h
  106.  
  107. par$O: par.c charset.h errmsg.h buffer.h reformat.h
  108.  
  109. reformat$O: reformat.c reformat.h errmsg.h buffer.h
  110.  
  111. clean:
  112.     $(RM) par $(OBJS) $(JUNK)
  113.