makefile 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. # Makefile for the DOS Go32v1 Run-time library.
  2. # we need the stupid copies and del because the old FPK Pascal doesn't handle
  3. # ppc386 ..\crt correct..
  4. #
  5. #####################################################################
  6. # Start of configurable section.
  7. # Please note that all these must be set in the main makefile, and
  8. # should be set there.
  9. # Don't remove the indef statements. They serve to avoid conflicts
  10. # with the main makefile.
  11. #####################################################################
  12. # set the directory where to install the units.
  13. ifndef UNITINSTALLDIR
  14. UNITINSTALLDIR=c:\lib\ppc
  15. endif
  16. # set the directory where to install libraries
  17. ifndef LIBINSTALLDIR
  18. LIBINSTALLDIR=c:\lib
  19. endif
  20. # What is the Operating System
  21. ifndef OS_SRC
  22. OS_SRC=GO32V1
  23. endif
  24. # What is the target operating system ?
  25. ifndef OS_TARGET
  26. OS_TARGET=GO32V1
  27. endif
  28. # What compiler to use ?
  29. # I think ppc386 is better (it's mostly in path) (FK)
  30. ifndef PP
  31. PP=ppc386
  32. endif
  33. # What options to pass to the compiler ?
  34. # You may want to specify a config file or error definitions file here.
  35. ifndef OPT
  36. OPT=
  37. endif
  38. # Where is the ppumove program ?
  39. ifndef PPUMOVE
  40. PPUMOVE=ppumove
  41. endif
  42. #####################################################################
  43. # End of configurable section.
  44. # Do not edit after this line.
  45. #####################################################################
  46. # Where are the include files
  47. INC=../../inc
  48. ifndef CPU
  49. CPU=i386
  50. endif
  51. PROCINC=../../$(CPU)
  52. # Where are the .ppi files.
  53. PPI=../ppi
  54. ifeq ($(OS_TARGET),$(OS_SRC))
  55. CROSSCOMPILE=NO
  56. else
  57. CROSSCOMPILE=YES
  58. endif
  59. # To copy pograms
  60. ifndef COPY
  61. COPY=cp -p
  62. endif
  63. # To delete programs
  64. ifndef DEL
  65. ifeq ($(DOS),YES)
  66. DEL=del
  67. else
  68. DEL=rm
  69. endif
  70. endif
  71. # To install programs
  72. ifndef INSTALL
  73. ifeq ($(DOS),YES)
  74. INSTALL=cp
  75. else
  76. INSTALL=install -m 644
  77. endif
  78. endif
  79. ifndef MKDIR
  80. ifeq ($(DOS),YES)
  81. MKDIR=mkdir
  82. else
  83. MKDIR=install -m 755 -d
  84. endif
  85. endif
  86. # Check for crosscompile
  87. ifeq ($(CROSSCOMPILE),YES)
  88. OPT:=$(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
  89. endif
  90. # check config file
  91. ifdef CFGFILE
  92. OPT:=$(OPT) @$(CFGFILE)
  93. endif
  94. # to be sure to be able to compile with an older
  95. # compiler version
  96. OPT:=$(OPT) -dFPC
  97. # diff program
  98. ifndef REFPATH
  99. REFPATH=/usr/local/fpk/work/new/rtl
  100. endif
  101. ifndef DIFF
  102. DIFF=diff
  103. endif
  104. ifndef DIFFOPTS
  105. DIFFOPTS=-b -c
  106. endif
  107. # os independent depends
  108. SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
  109. $(INC)/heaph.inc $(INC)/innr.inc $(INC)/sstrings.inc $(INC)/file.inc \
  110. $(INC)/text.inc $(INC)/typefile.inc $(INC)/version.inc $(INC)/filerec.inc \
  111. $(INC)/textrec.inc $(INC)/objpas.inc $(INC)/objpash.inc \
  112. $(PROCINC)/math.inc $(PROCINC)/set.inc $(PROCINC)/heap.inc $(PROCINC)/$(CPU).inc
  113. PPUEXT=.pp1
  114. PPLEXT=.ppl
  115. # At this moment only static libs under go32v2. When shared libs are made then
  116. # we should ask what kind of lib user wants, and then set the correct
  117. # extension... (see linux makefile for example)
  118. LIBEXT=.a1
  119. OEXT=.o1
  120. .PHONY: all clean install diffs diffclean
  121. all : system$(PPUEXT) prt0$(OEXT) crt$(PPUEXT) go32$(PPUEXT) strings$(PPUEXT) \
  122. dos$(PPUEXT) printer$(PPUEXT) objects$(PPUEXT) \
  123. mmx$(PPUEXT) cpu$(PPUEXT) \
  124. mouse$(PPUEXT) fmouse$(PPUEXT) getopts$(PPUEXT) graph$(PPUEXT)
  125. printer$(PPUEXT) : ../printer.pp system$(PPUEXT)
  126. $(COPY) ../printer.pp .
  127. $(PP) $(OPT) printer.pp $(REDIR)
  128. $(DEL) printer.pp
  129. getopts$(PPUEXT) : $(PROCINC)/getopts.pp system$(PPUEXT)
  130. $(COPY) $(PROCINC)/getopts.pp .
  131. $(PP) $(OPT) getopts.pp $(REDIR)
  132. $(DEL) getopts.pp
  133. graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) system$(PPUEXT) mmx$(PPUEXT) \
  134. $(PPI)/arc.ppi $(PPI)/colors.ppi $(PPI)/dpmi2raw.ppi $(PPI)/ellipse.ppi \
  135. $(PPI)/fill.ppi $(PPI)/font.ppi $(PPI)/global.ppi $(PPI)/ibm.ppi \
  136. $(PPI)/image.ppi $(PPI)/line.ppi $(PPI)/modes.ppi $(PPI)/move.ppi \
  137. $(PPI)/palette.ppi $(PPI)/pixel.ppi $(PPI)/stdcolor.ppi $(PPI)/text.ppi \
  138. $(PPI)/triangle.ppi $(PPI)/vesadeb.ppi
  139. $(COPY) ../graph.pp $(PPI)/*.ppi .
  140. $(PP) $(OPT) graph $(REDIR)
  141. $(DEL) graph.pp *.ppi
  142. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  143. $(COPY) $(PROCINC)/mmx.pp .
  144. $(PP) $(OPT) mmx.pp $(REDIR)
  145. $(DEL) mmx.pp
  146. cpu$(PPUEXT) : ../../i386/cpu.pp system$(PPUEXT)
  147. $(COPY) ../../i386/cpu.pp .
  148. $(PP) $(OPT) cpu $(REDIR)
  149. $(DEL) cpu.pp
  150. strings$(PPUEXT) : $(PROCINC)/strings.pp system$(PPUEXT)
  151. $(COPY) $(PROCINC)/strings.pp .
  152. $(PP) $(OPT) strings.pp $(REDIR)
  153. $(DEL) strings.pp
  154. dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  155. go32$(PPUEXT) system$(PPUEXT) strings$(PPUEXT)
  156. $(COPY) ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc .
  157. $(PP) $(OPT) dos $(REDIR)
  158. $(DEL) dos.pp filerec.inc textrec.inc
  159. system$(PPUEXT) : system.pp $(SYSTEMDEPS)
  160. $(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
  161. $(PP) $(OPT) -Us -Sg system $(REDIR)
  162. $(DEL) systemh.inc system.inc real2str.inc version.inc $(CPU).inc sstrings.inc
  163. $(DEL) mathh.inc math.inc set.inc innr.inc heap.inc heaph.inc objpash.inc
  164. $(DEL) filerec.inc textrec.inc file.inc typefile.inc text.inc objpas.inc
  165. prt0$(OEXT) : prt0.as
  166. as -D -o prt0$(OEXT) prt0.as
  167. crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) system$(PPUEXT)
  168. $(COPY) ../crt.pp $(INC)/textrec.inc .
  169. $(PP) $(OPT) crt $(REDIR)
  170. $(DEL) crt.pp textrec.inc
  171. go32$(PPUEXT) : ../go32.pp system$(PPUEXT)
  172. $(COPY) ../go32.pp .
  173. $(PP) $(OPT) go32.pp $(REDIR)
  174. $(DEL) go32.pp
  175. objects$(PPUEXT) : ../objects.pp system$(PPUEXT)
  176. $(COPY) ../objects.pp .
  177. $(PP) $(OPT) objects.pp $(REDIR)
  178. $(DEL) objects.pp
  179. mouse$(PPUEXT) : ../mouse.pp system$(PPUEXT)
  180. $(COPY) ../mouse.pp .
  181. $(PP) $(OPT) mouse.pp $(REDIR)
  182. $(DEL) mouse.pp
  183. fmouse$(PPUEXT) : ../fmouse.pp system$(PPUEXT)
  184. $(COPY) ../fmouse.pp .
  185. $(PP) $(OPT) fmouse.pp $(REDIR)
  186. $(DEL) fmouse.pp
  187. clean:
  188. -$(DEL) *$(OEXT)
  189. -$(DEL) *$(PPUEXT)
  190. -$(DEL) *.dif
  191. -$(DEL) log
  192. -$(DEL) *.as
  193. diffclean:
  194. -$(DEL) *.dif
  195. install: all
  196. -$(MKDIR) $(LIBINSTALLDIR)/dosunits
  197. $(INSTALL) *$(OEXT) $(LIBINSTALLDIR)/dosunits
  198. $(INSTALL) *$(PPUEXT) $(LIBINSTALLDIR)/dosunits
  199. %.dif : %.pp
  200. -$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
  201. %.dif : %.inc
  202. -$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v1/$*.inc > $*.dif
  203. %.dif : %.as
  204. -$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
  205. makefile.dif : makefile
  206. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
  207. diffs: system.dif os.dif makefile.dif prt0.dif