makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. # makes the SYSTEM-Unit for Win32
  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=DOS
  18. endif
  19. # What is the target operating system ?
  20. ifndef OS_TARGET
  21. OS_TARGET=WIN32
  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 -TWIN32
  91. endif
  92. # Was a config file specified ?
  93. ifdef CFGFILE
  94. OPT:=$(OPT) @$(CFGFILE)
  95. endif
  96. # os independent depends
  97. SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
  98. $(INC)/heaph.inc $(INC)/innr.inc $(INC)/sstrings.inc $(INC)/file.inc \
  99. $(INC)/text.inc $(INC)/typefile.inc $(INC)/version.inc $(INC)/filerec.inc \
  100. $(INC)/textrec.inc $(INC)/objpas.inc $(INC)/objpash.inc \
  101. $(PROCINC)/math.inc $(PROCINC)/set.inc $(PROCINC)/heap.inc $(PROCINC)/$(CPU).inc
  102. PPUEXT = .ppu
  103. OEXT = .obj
  104. .PHONY: all clean install diffs diffclean
  105. all : syswin32$(PPUEXT) strings$(PPUEXT) getopts$(PPUEXT) \
  106. base$(PPUEXT)
  107. getopts$(PPUEXT) : $(PROCINC)/getopts.pp syswin32$(PPUEXT)
  108. $(COPY) $(PROCINC)/getopts.pp .
  109. $(PP) $(OPT) getopts.pp $(REDIR)
  110. $(DEL) getopts.pp
  111. strings$(PPUEXT) : $(PROCINC)/strings.pp syswin32$(PPUEXT)
  112. $(COPY) $(PROCINC)/strings.pp .
  113. $(PP) $(OPT) strings.pp $(REDIR)
  114. $(DEL) strings.pp
  115. dos$(PPUEXT) : dos.pp strings$(PPUEXT) syswin32$(PPUEXT)
  116. $(PP) $(OPT) dos.pp $(REDIR)
  117. base$(PPUEXT) : base.pp syswin32$(PPUEXT)
  118. $(PP) $(OPT) base.pp $(REDIR)
  119. syswin32$(PPUEXT) : syswin32.pp $(SYSTEMDEP)
  120. $(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
  121. $(PP) $(OPT) -Us -Sg syswin32 $(REDIR)
  122. $(DEL) systemh.inc system.inc real2str.inc version.inc $(CPU).inc sstrings.inc
  123. $(DEL) mathh.inc math.inc set.inc innr.inc heap.inc heaph.inc objpash.inc
  124. $(DEL) filerec.inc textrec.inc file.inc typefile.inc text.inc objpas.inc
  125. clean:
  126. -$(DEL) *$(OEXT)
  127. -$(DEL) *$(PPUEXT)
  128. -$(DEL) *.dif
  129. -$(DEL) *.s
  130. -$(DEL) log
  131. diffclean:
  132. -$(DEL) *.dif
  133. install: all
  134. $(MKDIR) $(LIBINSTALLDIR)/units
  135. $(INSTALL) *$(OEXT) *$(PPUEXT) $(LIBINSTALLDIR)/units
  136. %.dif : %.pp
  137. -$(DIFF) $(DIFOPTS) $*.pp $(REFPATH)/win32/$*.pp > $*.dif
  138. %.dif : %.inc
  139. -$(DIFF) $(DIFOPTS) $*.inc $(REFPATH)/win32/$*.inc > $*.dif
  140. %.dif : %.as
  141. -$(DIFF) $(DIFOPTS) $*.as $(REFPATH)/win32/$*.as > $*.dif
  142. makefile.dif : makefile
  143. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/os2/makefile > makefile.dif
  144. diffs: syswin32.dif dos.dif os.dif