2
0

NWGNUenvironment.inc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. #
  2. # Setup needed Tools and Libraries
  3. #
  4. ifeq "$(wildcard $(APR_WORK)\build\NWGNUcustom.inc)" "$(APR_WORK)\build\NWGNUcustom.inc"
  5. include $(APR_WORK)\build\NWGNUcustom.inc
  6. CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
  7. endif
  8. ifndef VERBOSE
  9. .SILENT:
  10. endif
  11. #
  12. # Treat like an include
  13. #
  14. ifndef EnvironmentDefined
  15. #
  16. # simple macros for parsing makefiles
  17. #
  18. EOLIST:=
  19. EMPTY :=
  20. COMMA := ,
  21. SPACE := $(EMPTY) $(EMPTY)
  22. #
  23. # Base environment
  24. #
  25. # Try and handle case issues
  26. ifndef NOVELLLIBC
  27. ifdef NovellLibC
  28. NOVELLLIBC = $(NovellLibC)
  29. endif
  30. endif
  31. ifndef NOVELLLIBC
  32. NOVELLLIBC = C:/novell/ndk/libc
  33. endif
  34. # This is a placeholder
  35. # ifndef LDAPSDK
  36. # LDAPSDK = C:/novell/ndk/cldapsdk
  37. # endif
  38. ifndef METROWERKS
  39. METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
  40. endif
  41. # If LM_LICENSE_FILE isn't defined, define a variable that can be used to
  42. # restart make with it defined
  43. ifndef LM_LICENSE_FILE
  44. NO_LICENSE_FILE = NO_LICENSE_FILE
  45. endif
  46. #
  47. # Set the Release type that you want to build, possible values are:
  48. #
  49. # debug - full debug switches are set
  50. # noopt - normal switches are set (default)
  51. # optimized - optimization switches are set
  52. ifdef reltype
  53. RELEASE=$(reltype)
  54. endif
  55. ifdef RELTYPE
  56. RELEASE=$(RELTYPE)
  57. endif
  58. ifdef debug
  59. RELEASE=debug
  60. endif
  61. ifdef DEBUG
  62. RELEASE=debug
  63. endif
  64. ifdef optimized
  65. RELEASE=optimized
  66. endif
  67. ifdef OPTIMIZED
  68. RELEASE=optimized
  69. endif
  70. ifndef RELEASE
  71. RELEASE = optimized
  72. endif
  73. ifeq "$(RELEASE)" "debug"
  74. OBJDIR = Debug
  75. endif
  76. ifeq "$(RELEASE)" "noopt"
  77. OBJDIR = Noopt
  78. endif
  79. ifeq "$(RELEASE)" "optimized"
  80. OBJDIR = Release
  81. endif
  82. #
  83. # Setup compiler information
  84. #
  85. # MetroWerks NLM tools
  86. CC = mwccnlm
  87. CPP = mwccnlm
  88. LINK = mwldnlm
  89. LIB = mwldnlm -type library -w nocmdline
  90. ifdef IPV6
  91. ifndef USE_STDSOCKETS
  92. USE_STDSOCKETS=1
  93. endif
  94. endif
  95. NOVI = $(NOVELLLIBC)\imports
  96. INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
  97. DEFINES = -DNETWARE
  98. ifndef USE_STDSOCKETS
  99. DEFINES += -DUSE_WINSOCK
  100. endif
  101. ifndef DEBUG
  102. DEFINES += -DNDEBUG
  103. endif
  104. #
  105. # MetroWerks static Libraries
  106. CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
  107. MATH3S =
  108. PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
  109. # Base compile flags
  110. # and prefix or precompiled header added here.
  111. # The default flags are as follows:
  112. #
  113. # -c compile only, no link
  114. # -nosyspath treat #include <...> like #include "..."
  115. # -Cpp_exceptions off disable C++ exceptions
  116. # -RTTI off disable C++ run-time typing information
  117. # -align 4 align on 4 byte bounderies
  118. # -w nocmdline disable command-line driver/parser warnings
  119. # -proc PII generate code base on Pentium II instruction set
  120. # -inst mmx use MMX extensions (not used)
  121. CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
  122. # -g generate debugging information
  123. # -O0 level 0 optimizations
  124. ifeq "$(RELEASE)" "debug"
  125. CFLAGS += -g -O0
  126. endif
  127. # -O4,p level 4 optimizations, optimize for speed
  128. ifeq "$(RELEASE)" "optimized"
  129. CFLAGS += -O4,p
  130. endif
  131. # -prefix fspr_arch_pre_nw.h #include pre_nw.h for all files
  132. CFLAGS += -prefix fspr_arch_pre_nw.h
  133. PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
  134. #
  135. # Declare major project deliverables output directories here
  136. #
  137. ifdef DEST
  138. INSTALL = $(DEST)
  139. ifeq (\, $(findstring \,$(INSTALL)))
  140. INSTDIRS = $(DEST)
  141. endif
  142. endif
  143. ifdef dest
  144. INSTALL = $(dest)
  145. ifeq (\, $(findstring \,$(INSTALL)))
  146. INSTDIRS = $(dest)
  147. endif
  148. endif
  149. ifndef INSTALL
  150. INSTALL = $(APR_WORK)\Dist
  151. INSTDIRS = $(APR_WORK)\Dist
  152. endif
  153. # Add support for building IPV6 alongside
  154. ifneq "$(IPV6)" ""
  155. DEFINES += -DNW_BUILD_IPV6
  156. INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
  157. ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
  158. OBJDIR := $(OBJDIR)_IPV6
  159. endif
  160. ifneq "$(findstring IPV6,$(INSTALL))" "IPV6"
  161. INSTALL := $(INSTALL)_IPV6
  162. endif
  163. ifneq "$(findstring IPV6,$(INSTDIRS))" "IPV6"
  164. INSTDIRS := $(INSTDIRS)_IPV6
  165. endif
  166. endif
  167. ifdef DEST
  168. INSTALLBASE := $(INSTALL)\Apache2
  169. INSTDEVDIRS := \
  170. $(INSTDIRS) \
  171. $(INSTALLBASE) \
  172. $(INSTALLBASE)\include \
  173. $(INSTALLBASE)\lib \
  174. INSTDIRS += \
  175. $(INSTALLBASE) \
  176. else
  177. INSTALLBASE := $(INSTALL)\apr
  178. INSTDEVDIRS := \
  179. $(INSTDIRS) \
  180. $(INSTALLBASE) \
  181. $(INSTALLBASE)\include \
  182. $(INSTALLBASE)\lib \
  183. INSTDIRS += \
  184. $(INSTALLBASE) \
  185. endif
  186. #
  187. # Declare Command and tool macros here
  188. #
  189. # Os2LibPath is an extra check to see if we are on NT
  190. ifdef Os2LibPath
  191. OS = Windows_NT
  192. endif
  193. ifeq "$(OS)" "Windows_NT"
  194. CMD=cmd /C
  195. CHK=cmd /C if exist
  196. CHKNOT=cmd /C if not exist
  197. DEL = del /F
  198. DELTREE = cmd /C rd /s/q
  199. WINNT=1
  200. XCOPYSW = /E
  201. else
  202. CMD=command /C
  203. CHK=command /C if exist
  204. CHKNOT=command /C if not exist
  205. DEL = del
  206. DELTREE = deltree /y
  207. XCOPYSW = /E /Y
  208. endif
  209. #
  210. # Setup base C compiler flags
  211. #
  212. #
  213. # Common directories
  214. #
  215. APR = $(APR_WORK)
  216. APRTEST = $(APR_WORK)/test
  217. APRUTIL = $(APU_WORK)
  218. APULDAP = $(APU_WORK)/ldap
  219. XML = $(APRUTIL)/xml
  220. #
  221. # Internal Libraries
  222. #
  223. APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
  224. APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
  225. APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
  226. XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
  227. #
  228. # Additional general defines
  229. #
  230. EnvironmentDefined = 1
  231. endif # ifndef EnvironmentDefined
  232. # This is always set so that it will show up in lower directories
  233. ifdef Path
  234. Path = $(PATH)
  235. endif