Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. #
  2. # Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
  3. #
  4. defaultrule: all
  5. #####################################################################
  6. # Autodetect OS (Linux or Dos or Windows NT)
  7. # define inlinux when running under linux
  8. # define inWinNT when running under WinNT
  9. #####################################################################
  10. # We need only / in the path
  11. override PATH:=$(subst \,/,$(PATH))
  12. # Search for PWD and determine also if we are under linux
  13. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
  14. ifeq ($(PWD),)
  15. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
  16. ifeq ($(PWD),)
  17. nopwd:
  18. @echo You need the GNU utils package to use this Makefile!
  19. @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
  20. @exit
  21. else
  22. inlinux=1
  23. endif
  24. else
  25. PWD:=$(firstword $(PWD))
  26. endif
  27. # Detect NT - NT sets OS to Windows_NT
  28. ifndef inlinux
  29. ifeq ($(OS),Windows_NT)
  30. inWinNT=1
  31. endif
  32. endif
  33. # Detect OS/2 - OS/2 has OS2_SHELL defined
  34. ifndef inlinux
  35. ifndef inWinNT
  36. ifdef OS2_SHELL
  37. inOS2=1
  38. endif
  39. endif
  40. endif
  41. # The extension of executables
  42. ifdef inlinux
  43. EXEEXT=
  44. else
  45. EXEEXT=.exe
  46. endif
  47. # The path which is search separated by spaces
  48. ifdef inlinux
  49. SEARCHPATH=$(subst :, ,$(PATH))
  50. else
  51. SEARCHPATH=$(subst ;, ,$(PATH))
  52. endif
  53. #####################################################################
  54. # FPC version/target Detection
  55. #####################################################################
  56. # What compiler to use ?
  57. ifndef FPC
  58. # Compatibility with old makefiles
  59. ifdef PP
  60. export FPC=$(PP)
  61. else
  62. ifdef inOS2
  63. export FPC=ppos2$(EXEEXT)
  64. else
  65. export FPC=ppc386$(EXEEXT)
  66. endif
  67. endif
  68. endif
  69. # Target OS
  70. ifndef OS_TARGET
  71. export OS_TARGET:=$(shell $(FPC) -iTO)
  72. endif
  73. # Source OS
  74. ifndef OS_SOURCE
  75. export OS_SOURCE:=$(shell $(FPC) -iSO)
  76. endif
  77. # Target CPU
  78. ifndef CPU_TARGET
  79. export CPU_TARGET:=$(shell $(FPC) -iTP)
  80. endif
  81. # Source CPU
  82. ifndef CPU_SOURCE
  83. export CPU_SOURCE:=$(shell $(FPC) -iSP)
  84. endif
  85. # FPC version
  86. ifndef FPC_VERSION
  87. export FPC_VERSION:=$(shell $(FPC) -iV)
  88. endif
  89. #####################################################################
  90. # Default Settings
  91. #####################################################################
  92. # Release ? Then force OPT and don't use extra opts via commandline
  93. ifndef REDIRFILE
  94. REDIRFILE=log
  95. endif
  96. ifdef RELEASE
  97. override OPT:=-Xs -OG2p3 -n
  98. endif
  99. # Verbose settings (warning,note,info)
  100. ifdef VERBOSE
  101. override OPT+=-vwni
  102. endif
  103. ifdef REDIR
  104. ifndef inlinux
  105. override FPC=redir -eo $(FPC)
  106. endif
  107. # set the verbosity to max
  108. override OPT+=-va
  109. override REDIR:= >> $(REDIRFILE)
  110. endif
  111. #####################################################################
  112. # User Settings
  113. #####################################################################
  114. # Targets
  115. # Clean
  116. # Install
  117. ZIPTARGET=install
  118. # Defaults
  119. # Directories
  120. ifndef PACKAGEDIR
  121. PACKAGEDIR=$(FPCDIR)/packages
  122. endif
  123. ifndef COMPONENTDIR
  124. COMPONENTDIR=$(FPCDIR)/components
  125. endif
  126. # Packages
  127. # Libraries
  128. #####################################################################
  129. # Standard rules
  130. #####################################################################
  131. #####################################################################
  132. # Package depends
  133. #####################################################################
  134. ifneq ($(wildcard $(RTLDIR)),)
  135. ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
  136. override COMPILEPACKAGES+=rtl
  137. rtl_package:
  138. $(MAKE) -C $(RTLDIR) all
  139. endif
  140. endif
  141. .PHONY: rtl_package
  142. #####################################################################
  143. # Users rules
  144. #####################################################################
  145. all:
  146. $(MAKE) -C $(OS_TARGET) all