makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. # makes the SYSTEM-Unit for OS2
  2. #
  3. # Copyright (c) 1996 by Michael Van Canneyt
  4. #####################################################################
  5. # Start of configurable section.
  6. # Please note that all these must be set in the main makefile, and
  7. # should be set there.
  8. # Don't remove the indef statements. They serve to avoid conflicts
  9. # with the main makefile.
  10. #####################################################################
  11. # set the directory where to install the units.
  12. ifndef LIBINSTALLDIR
  13. LIBINSTALLDIR=c:/pp/bin
  14. endif
  15. # What is the Operating System
  16. ifndef OS_SRC
  17. OS_SRC=os2
  18. endif
  19. # What is the target operating system ?
  20. ifndef OS_TARGET
  21. OS_TARGET=os2
  22. endif
  23. # What compiler to use ?
  24. ifndef PP
  25. PP=../../ppc386
  26. endif
  27. # What options to pass to the compiler ?
  28. # You may want to specify a config file or error definitions file here.
  29. ifndef OPT
  30. OPT=
  31. endif
  32. ifndef CPU
  33. CPU=i386
  34. endif
  35. #####################################################################
  36. # End of configurable section.
  37. # Do not edit after this line.
  38. #####################################################################
  39. # Where are the include files
  40. INC=../inc
  41. PROCINC=../$(CPU)
  42. ifeq ($(OS_TARGET),$(OS_SRC))
  43. CROSSCOMPILE=NO
  44. else
  45. CROSSCOMPILE=YES
  46. endif
  47. # To copy pograms
  48. ifndef COPY
  49. ifeq ($(DOS),YES)
  50. COPY=copy
  51. else
  52. COPY=cp -f -p
  53. endif
  54. endif
  55. # To delete programs
  56. ifndef DEL
  57. ifeq ($(DOS),YES)
  58. DEL=del
  59. else
  60. DEL=rm
  61. endif
  62. endif
  63. # To install programs
  64. ifndef INSTALL
  65. ifeq ($(DOS),YES)
  66. INSTALL=copy
  67. else
  68. INSTALL=install -m 644
  69. endif
  70. endif
  71. # To make a directory.
  72. ifndef MKDIR
  73. ifeq ($(DOS),YES)
  74. MKDIR=mkdir
  75. else
  76. MKDIR=install -m 755 -d
  77. endif
  78. endif
  79. #diff program
  80. ifndef REFPATH
  81. REFPATH=/usr/local/fpk/work/new/rtl
  82. endif
  83. ifndef DIFF
  84. DIFF=diff
  85. endif
  86. ifndef DIFFOPTS
  87. DIFFOPTS=-b -c
  88. endif
  89. ifeq ($(CROSSCOMPILE),YES)
  90. OPT:=$(OPT) -dCROSSCOMPILE -TOS2
  91. endif
  92. # Was a config file specified ?
  93. ifdef CFGFILE
  94. OPT:=$(OPT) @$(CFGFILE)
  95. endif
  96. PPUEXT = .ppu
  97. OEXT = .obj
  98. .PHONY: all clean install diffs diffclean
  99. all : sysos2$(PPUEXT) prt0$(OEXT) prt1$(OEXT) dosinit$(OEXT) \
  100. strings$(PPUEXT) dos$(PPUEXT) getopts$(PPUEXT)
  101. getopts$(PPUEXT) : $(PROCINC)/getopts.pp sysos2$(PPUEXT)
  102. $(COPY) $(PROCINC)/getopts.pp .
  103. $(PP) $(OPT) getopts.pp $(REDIR)
  104. $(DEL) getopts.pp
  105. strings$(PPUEXT) : $(PROCINC)/strings.pp sysos2$(PPUEXT)
  106. $(COPY) $(PROCINC)/strings.pp .
  107. $(PP) $(OPT) strings.pp $(REDIR)
  108. $(DEL) strings.pp
  109. dos$(PPUEXT) : dos.pas strings$(PPUEXT) sysos2$(PPUEXT)
  110. $(PP) $(OPT) dos.pas $(REDIR)
  111. sysos2$(PPUEXT) : sysos2.pas $(INC)/systemh.inc $(INC)/system.inc $(INC)/real2str.inc \
  112. $(INC)/mathh.inc $(PROCINC)/math.inc $(PROCINC)/set.inc $(INC)/innr.inc $(PROCINC)/heap.inc \
  113. $(INC)/heaph.inc $(INC)/textrec.inc $(INC)/filerec.inc $(PROCINC)/$(CPU).inc
  114. $(COPY) $(INC)/systemh.inc .
  115. $(COPY) $(INC)/system.inc .
  116. $(COPY) $(PROCINC)/$(CPU).inc .
  117. $(COPY) $(INC)/real2str.inc .
  118. $(COPY) $(INC)/mathh.inc .
  119. $(COPY) $(PROCINC)/math.inc .
  120. $(COPY) $(PROCINC)/set.inc .
  121. $(COPY) $(INC)/innr.inc .
  122. $(COPY) $(PROCINC)/heap.inc .
  123. $(COPY) $(INC)/heaph.inc .
  124. $(COPY) $(INC)/textrec.inc .
  125. $(COPY) $(INC)/filerec.inc .
  126. $(PP) $(OPT) -Us sysos2.pas $(REDIR)
  127. $(DEL) systemh.inc
  128. $(DEL) system.inc
  129. $(DEL) real2str.inc
  130. $(DEL) mathh.inc
  131. $(DEL) math.inc
  132. $(DEL) set.inc
  133. $(DEL) innr.inc
  134. $(DEL) heap.inc
  135. $(DEL) heaph.inc
  136. $(DEL) $(CPU).inc
  137. $(DEL) textrec.inc
  138. $(DEL) filerec.inc
  139. prt0$(OEXT) : prt0.as
  140. as -D -o prt0$(OEXT) prt0.as
  141. prt1$(OEXT) : prt1.as
  142. as -D -o prt1$(OEXT) prt1.as
  143. dosinit$(OEXT) : dosinit.as
  144. as -D -o dosinit$(OEXT) dosinit.as
  145. clean:
  146. -$(DEL) *$(OEXT)
  147. -$(DEL) *$(PPUEXT)
  148. -$(DEL) *.dif
  149. -$(DEL) *.s
  150. -$(DEL) log
  151. diffclean:
  152. -$(DEL) *.dif
  153. install: all
  154. $(MKDIR) $(LIBINSTALLDIR)/os2units
  155. $(INSTALL) *$(OEXT) *$(PPUEXT) $(LIBINSTALLDIR)/os2units
  156. %.dif : %.pas
  157. -$(DIFF) $(DIFOPTS) $*.pas $(REFPATH)/os2/$*.pas > $*.dif
  158. %.dif : %.inc
  159. -$(DIFF) $(DIFOPTS) $*.inc $(REFPATH)/os2/$*.inc > $*.dif
  160. %.dif : %.as
  161. -$(DIFF) $(DIFOPTS) $*.as $(REFPATH)/os2/$*.as > $*.dif
  162. makefile.dif : makefile
  163. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/os2/makefile > makefile.dif
  164. diffs: sysos2.dif dos.dif doscalls.dif os.dif prt0.dif prt1.dif dosinit.dif \
  165. makefile.dif