makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. CFG=../cfg
  43. # Get some defaults for Programs and OSes.
  44. # This will set the following variables :
  45. # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
  46. # It will also set OPT for cross-compilation, and add required options.
  47. # also checks for config file.
  48. # it expects INC PROCINC to be set !!
  49. include $(CFG)/makefile.cfg
  50. # Get the system independent include file names.
  51. # This will set the following variables :
  52. # SYSINCNAMES
  53. include $(INC)/makefile.inc
  54. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  55. # Get the processor dependent include file names.
  56. # This will set the following variables :
  57. # CPUINCNAMES
  58. include $(PROCINC)/makefile.cpu
  59. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  60. # Put system unit dependencies together.
  61. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  62. #####################################################################
  63. # System dependent
  64. #####################################################################
  65. PPUEXT = .ppu
  66. OEXT = .obj
  67. .PHONY: all clean install diffs diffclean
  68. all : sysos2$(PPUEXT) prt0$(OEXT) prt1$(OEXT) dosinit$(OEXT) \
  69. strings$(PPUEXT) dos$(PPUEXT) getopts$(PPUEXT)
  70. getopts$(PPUEXT) : $(PROCINC)/getopts.pp sysos2$(PPUEXT)
  71. $(COPY) $(PROCINC)/getopts.pp .
  72. $(PP) $(OPT) getopts.pp $(REDIR)
  73. $(DEL) getopts.pp
  74. strings$(PPUEXT) : $(PROCINC)/strings.pp sysos2$(PPUEXT)
  75. $(COPY) $(PROCINC)/strings.pp .
  76. $(PP) $(OPT) strings.pp $(REDIR)
  77. $(DEL) strings.pp
  78. dos$(PPUEXT) : dos.pas strings$(PPUEXT) sysos2$(PPUEXT)
  79. $(PP) $(OPT) dos.pas $(REDIR)
  80. sysos2$(PPUEXT) : sysos2.pas $(SYSDEPS)
  81. $(PP) $(OPT) -Us sysos2.pas $(REDIR)
  82. prt0$(OEXT) : prt0.so2
  83. as -D -o prt0$(OEXT) prt0.as
  84. prt1$(OEXT) : prt1.so2
  85. as -D -o prt1$(OEXT) prt1.as
  86. dosinit$(OEXT) : dosinit.as
  87. as -D -o dosinit$(OEXT) dosinit.as
  88. clean:
  89. -$(DEL) *$(OEXT)
  90. -$(DEL) *$(PPUEXT)
  91. -$(DEL) *.dif
  92. -$(DEL) *.s
  93. -$(DEL) log
  94. diffclean:
  95. -$(DEL) *.dif
  96. install: all
  97. $(MKDIR) $(LIBINSTALLDIR)/os2units
  98. $(INSTALL) *$(OEXT) *$(PPUEXT) $(LIBINSTALLDIR)/os2units
  99. %.dif : %.pas
  100. -$(DIFF) $(DIFOPTS) $*.pas $(REFPATH)/os2/$*.pas > $*.dif
  101. %.dif : %.inc
  102. -$(DIFF) $(DIFOPTS) $*.inc $(REFPATH)/os2/$*.inc > $*.dif
  103. %.dif : %.as
  104. -$(DIFF) $(DIFOPTS) $*.as $(REFPATH)/os2/$*.as > $*.dif
  105. makefile.dif : makefile
  106. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/os2/makefile > makefile.dif
  107. diffs: sysos2.dif dos.dif doscalls.dif os.dif prt0.dif prt1.dif dosinit.dif \
  108. makefile.dif