home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / config / config.mak < prev    next >
Encoding:
Text File  |  1998-04-08  |  9.8 KB  |  358 lines

  1. # The contents of this file are subject to the Netscape Public License
  2. # Version 1.0 (the "NPL"); you may not use this file except in
  3. # compliance with the NPL.  You may obtain a copy of the NPL at
  4. # http://www.mozilla.org/NPL/
  5. #
  6. # Software distributed under the NPL is distributed on an "AS IS" basis,
  7. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  8. # for the specific language governing rights and limitations under the
  9. # NPL.
  10. #
  11. # The Initial Developer of this code under the NPL is Netscape
  12. # Communications Corporation.  Portions created by Netscape are
  13. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  14. # Reserved.
  15.  
  16. !if !defined(CONFIG_CONFIG_MAK)
  17. CONFIG_CONFIG_MAK=1
  18.  
  19. #//------------------------------------------------------------------------
  20. #//
  21. #// Define public make variables:
  22. #//
  23. #//    OBJDIR  - Specifies the location of intermediate files (ie. objs...)
  24. #//              Currently, the names are WINxx_O.OBJ or WINxx_D.OBJ for
  25. #//              optimized and debug builds respectively.
  26. #//
  27. #//    DIST    - Specifies the location of the distribution directory where
  28. #//              all targets are delivered.
  29. #//
  30. #//    CFGFILE - Specifies the name of the temporary configuration file 
  31. #//              containing the arguments to the current command.
  32. #//
  33. #//    INCS    - Default include paths.
  34. #//
  35. #//    CFLAGS  - Default compiler options.
  36. #//
  37. #//    LFLAGS  - Default linker options.
  38. #//
  39. #//------------------------------------------------------------------------
  40.  
  41. !if [$(MOZ_TOOLS)\bin\uname > osuname.inc]
  42. !endif
  43. WINOS=\
  44. !include "osuname.inc"
  45. WINOS=$(WINOS: =)^
  46.  
  47. !if [del osuname.inc]
  48. !endif
  49.  
  50. ## Include support for MOZ_LITE/MOZ_MEDIUM
  51. include <$(DEPTH)/config/liteness.mak>
  52.  
  53. !if "$(MOZ_BITS)" == "16"
  54.  
  55. !if "$(MAKE_OBJ_TYPE)" == "DLL"
  56. OBJTYPE=D
  57. !else
  58. OBJTYPE=E
  59. !endif
  60.  
  61. !else
  62. OBJTYPE=
  63. !endif
  64.  
  65. XPDIST=$(DEPTH)\dist
  66. PUBLIC=$(XPDIST)\public
  67.  
  68. #//-----------------------------------------------------------------------
  69. #// OBJDIR is NOT the same as DIST for Win16. The Win16 dist stuff can
  70. #// be built with EXE or DLL compiler flags, but the DIST directory
  71. #// has the same name no matter what
  72. #//-----------------------------------------------------------------------
  73.  
  74. !ifdef MOZ_NAV_BUILD_PREFIX
  75. DIST_PREFIX=NAV
  76. !else
  77. DIST_PREFIX=WIN
  78. !endif
  79.  
  80. !ifndef MOZ_DEBUG
  81. OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_O.OBJ
  82. JAVA_OPTIMIZER = -O
  83. !ifdef NO_CAFE
  84. JAVAC_OPTIMIZER =
  85. !else
  86. #JAVAC_OPTIMIZER= -O -noinline
  87. JAVAC_OPTIMIZER =
  88. !endif
  89. !else
  90. OBJDIR=$(DIST_PREFIX)$(MOZ_BITS)$(OBJTYPE)_D.OBJ
  91. JAVA_OPTIMIZER = -g
  92. JAVAC_OPTIMIZER = -g
  93. !endif
  94.  
  95. #//
  96. #// DIST DEFINES SHOULD NEVER BE COMPONENT SPECIFIC.
  97. #//
  98. !ifndef MOZ_DEBUG
  99. DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_O.OBJ
  100. !else
  101. DIST=$(XPDIST)\$(DIST_PREFIX)$(MOZ_BITS)_D.OBJ
  102. !endif
  103.  
  104. CFGFILE=$(OBJDIR)\cmd.cfg
  105.  
  106. !if "$(MOZ_BITS)" == "16"
  107. INCS=-I$(XPDIST)\public\win16 $(INCS) -I$(MOZ_SRC)\ns\include -I$(DIST)\include -I..\include
  108. !else
  109. INCS=$(INCS) -I$(MOZ_SRC)\ns\include -I$(DIST)\include \
  110.              -I$(XPDIST)\public\img -I$(XPDIST)\public\util \
  111.              -I$(XPDIST)\public\coreincl
  112. !endif # 16
  113.  
  114. !ifndef NO_LAYERS
  115. INCS=$(INCS) -I$(DEPTH)\lib\liblayer\include
  116. !endif 
  117.  
  118. !if "$(STAND_ALONE_JAVA)" == "1"
  119. LCFLAGS=$(LCFLAGS) -DSTAND_ALONE_JAVA
  120. !endif
  121.  
  122.  
  123. !if defined(MOZ_JAVA)
  124. MOZ_JAVA_FLAG=-DJAVA
  125. !endif
  126.  
  127. # Perhaps we should add MOZ_LITENESS_FLAGS to 16 bit build
  128. !if "$(MOZ_BITS)" == "16"
  129. CFLAGS=$(MOZ_JAVA_FLAG) -DMOCHA -DLAYERS -DEDITOR $(OS_CFLAGS) $(MOZ_CFLAGS)
  130. !else
  131. CFLAGS=$(MOZ_JAVA_FLAG) -DMOCHA -DLAYERS $(OS_CFLAGS) $(MOZ_CFLAGS) $(MOZ_LITENESS_FLAGS)
  132. !endif
  133. LFLAGS=$(OS_LFLAGS) $(LLFLAGS) $(MOZ_LFLAGS)
  134.  
  135. # This compiles in heap dumping utilities and other good stuff 
  136. # for developers -- maybe we only want it in for a special SDK 
  137. # nspr/java runtime(?):
  138. !if "$(MOZ_BITS)"=="32" || defined(MOZ_DEBUG)
  139. CFLAGS = $(CFLAGS) -DDEVELOPER_DEBUG
  140. !endif
  141.  
  142. !ifdef STANDALONE_IMAGE_LIB
  143. CFLAGS=$(CFLAGS) -DSTANDALONE_IMAGE_LIB
  144. !endif
  145.  
  146. # always need these:
  147. CFLAGS = $(CFLAGS) -DNETSCAPE
  148.  
  149. # Specify that we are building a client.
  150. # This will instruct the cross platform libraries to
  151. # include all the client specific cruft.
  152. !if defined(SERVER_BUILD)
  153. CFLAGS = $(CFLAGS) -DSERVER_BUILD
  154. !elseif defined(LIVEWIRE)
  155. CFLAGS = $(CFLAGS) -DLIVEWIRE
  156. !else
  157. CFLAGS = $(CFLAGS) -DMOZILLA_CLIENT
  158. !endif
  159.  
  160. PERL= $(MOZ_TOOLS)\perl5\perl.exe
  161. MASM = $(MOZ_TOOLS)\bin\ml.exe
  162.  
  163. !if "$(WINOS)" == "WIN95"
  164. MKDIR = $(MOZ_SRC)\ns\config\w95mkdir
  165. QUIET =
  166. !else
  167. MKDIR = mkdir
  168. QUIET=@
  169. !endif
  170.  
  171.  
  172. #//------------------------------------------------------------------------
  173. #//
  174. #// Include the OS dependent configuration information
  175. #//
  176. #//------------------------------------------------------------------------
  177. include <$(DEPTH)/config/WIN$(MOZ_BITS)>
  178.  
  179. !ifdef MOZ_DEBUG
  180. !ifdef USERNAME
  181. CFLAGS = $(CFLAGS) -DDEBUG_$(USERNAME)
  182. !endif
  183. !endif
  184.  
  185. #//------------------------------------------------------------------------
  186. #//
  187. #// Define the global make commands.
  188. #//
  189. #//    MAKE_INSTALL  - Copy a target to the distribution directory.
  190. #//
  191. #//    MAKE_OBJDIRS  - Create an object directory (if necessary).
  192. #//
  193. #//     MAKE_MANGLE   - Convert all long filenames into 8.3 names
  194. #//
  195. #//     MAKE_UNMANGLE - Restore all long filenames
  196. #//
  197. #//------------------------------------------------------------------------
  198. !if !defined(MOZ_SRC)
  199. #enable builds on any drive if defined.
  200. MOZ_SRC=y:
  201. !endif
  202. MAKE_INSTALL=$(QUIET)$(DEPTH)\config\makecopy.exe
  203. MAKE_MANGLE=$(DEPTH)\config\mangle.exe
  204. MAKE_UNMANGLE=if exist unmangle.bat call unmangle.bat
  205.  
  206. #//------------------------------------------------------------------------
  207. #//
  208. #// Common Libraries
  209. #//
  210. #//------------------------------------------------------------------------
  211. !ifdef NSPR20
  212. !if "$(MOZ_BITS)" == "16"
  213. LIBNSPR=$(DIST)\lib\nspr21.lib
  214. LIBNSPR=$(LIBNSPR) $(DIST)\lib\plds21.lib
  215. LIBNSPR=$(LIBNSPR) $(DIST)\lib\msgc21.lib
  216. !else
  217. LIBNSPR=$(DIST)\lib\libnspr21.lib
  218. LIBNSPR=$(LIBNSPR) $(DIST)\lib\libplds21.lib
  219. LIBNSPR=$(LIBNSPR) $(DIST)\lib\libmsgc21.lib
  220. !endif
  221. !else
  222. LIBNSPR=$(DIST)\lib\pr$(MOZ_BITS)$(VERSION_NUMBER).lib
  223. !endif
  224.  
  225. !ifdef NSPR20
  226. NSPRDIR = nsprpub
  227. CFLAGS = $(CFLAGS) -DNSPR20
  228. !else
  229. NSPRDIR = nspr
  230. !endif
  231.  
  232. LIBJPEG=$(DIST)\lib\jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib
  233.  
  234. ######################################################################
  235. ### Windows-Specific Java Stuff
  236.  
  237. PATH_SEPARATOR = ;
  238.  
  239. # where the bytecode will go
  240. !if "$(AWT_11)" == "1"
  241. JAVA_DESTPATH = $(MOZ_SRC)\ns\dist\classes11
  242. !else
  243. JAVA_DESTPATH = $(MOZ_SRC)\ns\dist\classes
  244. !endif
  245.  
  246. # where the source are
  247. DEFAULT_JAVA_SOURCEPATH = $(MOZ_SRC)\ns\sun-java\classsrc
  248. !ifndef JAVA_SOURCEPATH
  249. !if "$(AWT_11)" == "1"
  250. JAVA_SOURCEPATH = $(MOZ_SRC)\ns\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH)
  251. !else
  252. JAVA_SOURCEPATH = $(DEFAULT_JAVA_SOURCEPATH)
  253. !endif
  254. !endif
  255.  
  256. JAVA_PROG=$(MOZ_TOOLS)\bin\java.exe
  257. #JAVA_PROG=$(DIST)\bin\java
  258.  
  259. JAVAC_ZIP=$(MOZ_TOOLS)/lib/javac.zip
  260.  
  261. ZIP_PROG = $(MOZ_TOOLS)\bin\zip
  262. UNZIP_PROG = $(MOZ_TOOLS)\bin\unzip
  263. ZIP_FLAGS = -0 -r -q
  264.  
  265. CFLAGS = $(CFLAGS) -DOS_HAS_DLL
  266.  
  267. DLL_SUFFIX    = dll
  268. LIB_SUFFIX    = lib
  269.  
  270. !if "$(STAND_ALONE_JAVA)" == "1"
  271. STAND_ALONE_JAVA_DLL_SUFFIX=s
  272. !else
  273. STAND_ALONE_JAVA_DLL_SUFFIX=
  274. !endif
  275.  
  276. MOD_JRT=jrt$(MOZ_BITS)$(VERSION_NUMBER)
  277. MOD_MM =mm$(MOZ_BITS)$(VERSION_NUMBER)
  278. MOD_AWT=awt$(MOZ_BITS)$(VERSION_NUMBER)
  279. MOD_AWTS=awt$(MOZ_BITS)$(VERSION_NUMBER)$(STAND_ALONE_JAVA_DLL_SUFFIX)
  280. MOD_JIT=jit$(MOZ_BITS)$(VERSION_NUMBER)
  281. MOD_JSJ=jsj$(MOZ_BITS)$(VERSION_NUMBER)
  282. MOD_NET=net$(MOZ_BITS)$(VERSION_NUMBER)
  283. MOD_JBN=jbn$(MOZ_BITS)$(VERSION_NUMBER)
  284. MOD_NSC=nsc$(MOZ_BITS)$(VERSION_NUMBER)
  285. MOD_JPW=jpw$(MOZ_BITS)$(VERSION_NUMBER)
  286. MOD_JDB=jdb$(MOZ_BITS)$(VERSION_NUMBER)
  287. MOD_ZIP=zip$(MOZ_BITS)$(VERSION_NUMBER)
  288. MOD_ZPW=zpw$(MOZ_BITS)$(VERSION_NUMBER)
  289. MOD_CON=con$(MOZ_BITS)$(VERSION_NUMBER)
  290.  
  291. JRTDLL=$(MOD_JRT).$(DLL_SUFFIX)
  292. MMDLL =$(MOD_MM).$(DLL_SUFFIX)
  293. AWTDLL=$(MOD_AWT).$(DLL_SUFFIX)
  294. AWTSDLL=$(MOD_AWT)$(STAND_ALONE_JAVA_DLL_SUFFIX).$(DLL_SUFFIX)
  295. JITDLL=$(MOD_JIT).$(DLL_SUFFIX)
  296. JSJDLL=$(MOD_JSJ).$(DLL_SUFFIX)
  297. NETDLL=$(MOD_NET).$(DLL_SUFFIX)
  298. JBNDLL=$(MOD_JBN).$(DLL_SUFFIX)
  299. NSCDLL=$(MOD_NSC).$(DLL_SUFFIX)
  300. JPWDLL=$(MOD_JPW).$(DLL_SUFFIX)
  301. JDBDLL=$(MOD_JDB).$(DLL_SUFFIX)
  302. ZIPDLL=$(MOD_ZIP).$(DLL_SUFFIX)
  303. ZPWDLL=$(MOD_ZPW).$(DLL_SUFFIX)
  304. CONDLL=$(MOD_CON).$(DLL_SUFFIX)
  305.  
  306. ZIPLIB=$(DIST)\lib\$(MOD_ZIP).$(LIB_SUFFIX)
  307. AWTLIB=$(DIST)\lib\$(MOD_AWT).$(LIB_SUFFIX)
  308.  
  309. ######################################################################
  310.  
  311. include <$(DEPTH)/config/common.mk>
  312.  
  313. JAVA_DEFINES =               \
  314.     -DJAR_NAME=\"$(JAR_NAME)\" \
  315.     -DJRTDLL=\"$(JRTDLL)\"       \
  316.     -DMMDLL=\"$(MMDLL)\"       \
  317.     -DAWTDLL=\"$(AWTDLL)\"       \
  318.     -DAWTSDLL=\"$(AWTSDLL)\"   \
  319.     -DJSJDLL=\"$(JSJDLL)\"       \
  320.     -DJITDLL=\"$(JITDLL)\"     \
  321.     -DNETDLL=\"$(NETDLL)\"     \
  322.     -DJBNDLL=\"$(JBNDLL)\"     \
  323.     -DNSCDLL=\"$(NSCDLL)\"     \
  324.     -DJDBDLL=\"$(JDBDLL)\"       \
  325.     -DJPWDLL=\"$(JPWDLL)\"     \
  326.     -DZPWDLL=\"$(ZPWDLL)\"     \
  327.     -DCONDLL=\"$(CONDLL)\"
  328. !if "$(MOZ_BITS)" == "16"
  329.  
  330. # Override JAVA_DEFINES to make command line short for win16.
  331. # Put any new defines into javadefs.h in ns/sun-java/include.
  332. # This is to shorten the command line in order not to break Win16.
  333.  
  334. JAVA_DEFINES = -DJAR_NAME=\"$(JAR_NAME)\" -DMOZ_BITS=\"$(MOZ_BITS)\" -DVERSION_NUMBER=\"$(VERSION_NUMBER)\" -DDLL_SUFFIX=\".$(DLL_SUFFIX)\"   
  335.  
  336. !endif
  337.  
  338.  
  339. #JAVA_CLASSPATH = $(JAVA_CLASSPATH:/=\)
  340. JMCSRCDIR = $(JMCSRCDIR:/=\)
  341. JAVA_BOOT_CLASSPATH = $(JAVA_BOOT_CLASSPATH:/=\)
  342.  
  343. NMAKE=nmake -nologo -$(MAKEFLAGS)
  344.  
  345. ########
  346. #   Get the cwd to prepend to all compiled source
  347. #       files.  Will allow debugger to automatically find sources
  348. #       instead of asking for the path info.
  349. #   Win16 will break if enabled, guess we continue to live in pain
  350. #       therein.
  351. ########
  352. !if "$(MOZ_BITS)" == "32"
  353. CURDIR=$(MAKEDIR)^\
  354. !endif
  355.  
  356. !endif # CONFIG_CONFIG_MAK
  357.  
  358.