home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pasos2b.zip / lib / makefile < prev    next >
Makefile  |  1993-11-03  |  5KB  |  189 lines

  1. #  Makefile
  2. #*
  3. #* FileName:   makefile
  4. #* $Source: E:/usr/src/c-code/pascal/RCS/begend/makefile,v $
  5. #* $Author: wjw $
  6. #* $Date: 1993/09/24 11:05:08 $
  7. #* $Locker: wjw $
  8. #* $State: Exp $
  9. #* $Revision: 
  10. #H  Description:
  11. #
  12. #       General definitions
  13. #       For special commands 
  14. LBIN     = ../bin/
  15. SYSTEM  = apollo
  16. SYSTEM  = # OS2
  17. #
  18. #       Definitions for the GMD Cocktail stuff
  19. include /usr/lib/makefile.gmd
  20. #
  21. #       Compiler definitions
  22. CC       = cc
  23. LDLIBDIR = -L../frontend -L$(GMDLIB) -L./80386 -L../src
  24. LDLIBS   = $(LDLIBDIR) -lfront -l80386 -laux -lreuse
  25. INCLUDES = -I../frontend -I../src -I./80386
  26. #    
  27. APOLLOCF = -W0,-opt,0 
  28. APOLLOLD = -Wl,-A,"stacksize\,0xfffff"
  29. SGICF    =
  30. OS2CF    = -I/emx/include -I$(GMDINC) 
  31. OS2LD    = 
  32. #          The default assumptions
  33. SYSCF    = $(APOLLOCF)
  34. SYSLD    = $(APOLLOLD)
  35.  
  36. OPTIMIZE = -g
  37. CFLAGS   = $(INCLUDES) $(OPTIMIZE) $(SYSCF) $(SWITCHES)
  38. LDFLAGS  = $(SYSLD)
  39.  
  40. #
  41. #    Sources, things which are specific in this module's directory
  42. #
  43. SOURCES = \
  44.     pas.c \
  45.     ast2beg.pum \
  46.     std2beg.pum \
  47.     set2beg.pum
  48. PASOBJ = \
  49.     pas.o \
  50.     ast2beg.o \
  51.     std2beg.o \
  52.     set2beg.o
  53. OTHER_RCS = makefile todo
  54.  
  55. Current: pas$(EXE)
  56.  
  57. ast2beg.h ast2beg.c: ast2beg.pum astfull.TS defalloc.TS
  58.     $(PUMA) -$(PUMAFLAGS)k ast2beg.pum
  59.     
  60. set2beg.h set2beg.c: set2beg.pum astfull.TS defalloc.TS
  61.     $(PUMA) -$(PUMAFLAGS)k set2beg.pum
  62.     
  63. std2beg.h std2beg.c: std2beg.pum astfull.TS defalloc.TS
  64.     $(PUMA) -$(PUMAFLAGS)k std2beg.pum
  65.     
  66. pas$(EXE): $(PASOBJ) 80386/lib80386.a ../frontend/libfront.a ../src/libaux.a
  67.     $(CC) $(LDFLAGS) -g -o pas$(EXE) $(PASOBJ) $(LDLIBS)
  68.  
  69. paslink:
  70.     $(CC) $(LDFLAGS) -g -o pas$(EXE) $(PASOBJ) $(LDLIBS)
  71.  
  72. astfull.TS: ../frontend/astfull.TS
  73.     cp ../frontend/astfull.TS .
  74.     $(PUMA) -t astfull.pum > astfull.dep
  75.     
  76. astfull.dep :astfull.pum astfull.TS
  77.     $(PUMA) -t astfull.pum > astfull.dep
  78.  
  79. defalloc.TS: ../frontend/defalloc.TS
  80.     cp ../frontend/defalloc.TS .
  81.     $(PUMA) -t deffull.pum > defalloc.dep
  82.     
  83. defalloc.dep :deffull.pum defalloc.TS
  84.     $(PUMA) -t deffull.pum > defalloc.dep
  85.  
  86. #---------------------------------------------------------------------
  87. #  Currently the lib stuff is done here so the rules need to here as well
  88. .SUFFIXES: .lib .obj .asm .pas
  89. PASDEBUG = -DDEBUG_IOREAD
  90. LIBSRC   = passtart.asm pashead.inc macros.inc \
  91.        paslib.pas paslib.inc \
  92.        iolib.pas \
  93.        heaplib.pas \
  94.        setlib.pas \
  95.        wrtlib.pas writes.inc
  96.        
  97. p.lib: passtart.obj paslib.obj iolib.obj heaplib.obj setlib.obj wrtlib.obj
  98.     -rm p.lib
  99.     lib p.lib +passtart.obj+paslib.obj+iolib.obj+heaplib.obj+setlib.obj+wrtlib.obj;
  100.     
  101. w.lib: passtart.obj wrtlib.obj paslib.obj setlib.obj 
  102.     -rm w.lib
  103.     lib w.lib +passtart.obj+paslib.obj+wrtlib.obj;
  104.     
  105. clean.lib:
  106.     -rm *.lib
  107.     -rm *.obj
  108.     -rm paslib.asm iolib.asm heaplib.asm setlib.asm
  109.     
  110. #  These rules are for the library modules which are compiled as were 
  111. #  they just regular programs. Only the need to be stripped of their 
  112. #  Pmain body.
  113. #
  114. .pas.asm:
  115.     pc -S $(PASDEBUG) $*.pas
  116.     strpmain $*.asm
  117.  
  118. .asm.obj:
  119.     asm $*.asm
  120.  
  121. ## DEPENDENCIES
  122.  
  123. passtart.obj: passtart.asm pashead.inc os2.inc macros.inc
  124. paslib.obj: paslib.pas pashead.inc os2.inc macros.inc
  125. iolib.obj: iolib.pas pashead.inc os2.inc macros.inc
  126. heaplib.obj: heaplib.pas pashead.inc os2.inc macros.inc
  127. setlib.obj: setlib.pas pashead.inc os2.inc macros.inc
  128.  
  129. #---------------------------------------------------------------------
  130. #
  131. #    Misc.
  132. #    Print the help info included in the top of this file
  133. help:
  134.     @sed '/#H/!d' ?akefile | sed 's/^#H//' | sed /sed/d $0
  135.                           
  136. #
  137. #    Convert from DOS format to UNIX format.
  138. #    and since tounix doesn't keep the dates set them to now.
  139. #
  140. tounix:
  141.     -tounix ${SOURCES}
  142.     -touch -c ${SOURCES}
  143.                            
  144. do_rcs:                    
  145.     @echo 'Enter a ^d (or ^z) terminated message, describing the change'
  146.     @cat - > /tmp/message
  147.     cii -V -l $(SOURCES) $(OTHER_RCS) < /tmp/message
  148.     @rm /tmp/message
  149.                            
  150. do_rcs.lib:
  151.     @echo 'Enter a ^d (or ^z) terminated message, describing the change'
  152.     @cat - > /tmp/message
  153.     cii -V -l $(LIBSRC) < /tmp/message
  154.     @rm /tmp/message
  155.                            
  156. #
  157. #       Remove all files which are not directly required for any
  158. #       of the executables.
  159. clean: testclean
  160.     -rm -f core *.bak *.BAK *.i barf* *.log *.lst
  161.     -rm -f *.rej *.orig *.tmp *.dep
  162.  
  163. testclean:        
  164.     -mv pas.exe pas.sav
  165.     -mv passtart.asm passtart.sav
  166.     -rm -f pc*.* test??.* test???.*
  167.     -rm -f *.map *.sbr *.asm *.obj
  168.     -rm *.exe
  169.     -mv pas.tmp pas.exe
  170.     -mv passtart.sav passtart.asm
  171.  
  172. #
  173. #       Removing all executables, tests, and other files which can be
  174. #       generated from the original sources.        
  175. veryclean: clean
  176.     -rm -f *.cg *.o *.TS
  177.  
  178. #*
  179. #* History:
  180. #*      First created by Willem Jan Withagen ( wjw@eb.ele.tue.nl )
  181. #*                    on Sun May  2 21:09:41 MET 1993
  182. #* $Log: makefile,v $
  183. #*      Revision 1.2  1993/09/24  11:05:08  wjw
  184. #*      Most of the constructs in the Compiler are now working (Reals ?)
  185. #*
  186. # Revision 1.1  1993/07/26  23:34:05  wjw
  187. # Initial Entry into RCS
  188. #
  189.