home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / js / jsj / makefile.win < prev    next >
Encoding:
Makefile  |  1998-04-08  |  5.2 KB  |  181 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. IGNORE_MANIFEST=1
  17.  
  18. #//------------------------------------------------------------------------
  19. #//
  20. #// Makefile to build the Java reflections of JavaScript objects
  21. #//
  22. #//------------------------------------------------------------------------
  23.  
  24.  
  25. #//------------------------------------------------------------------------
  26. #//
  27. #// Specify the depth of the current directory relative to the
  28. #// root of NS
  29. #//
  30. #//------------------------------------------------------------------------
  31. DEPTH= ..\..
  32.  
  33. !ifdef MOZ_JAVA
  34. DIRS = classes
  35. !endif
  36.  
  37.  
  38. #//------------------------------------------------------------------------
  39. #//
  40. #// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
  41. #//
  42. #//------------------------------------------------------------------------
  43. DLLNAME=jsj$(MOZ_BITS)$(VERSION_NUMBER)
  44. PDBFILE=$(DLLNAME).pdb
  45. MAPFILE        = $(DLLNAME).map
  46. RESFILE        = jsj1640.res
  47. DLL=.\$(OBJDIR)\$(DLLNAME).dll
  48. MAKE_OBJ_TYPE    = DLL
  49.  
  50. !if "$(MOZ_BITS)" == "16"
  51. DEFFILE        = $(DLLNAME).def
  52. !endif
  53.  
  54. !ifdef MOZ_JAVA
  55. LLIBS=$(LIBNSPR) $(DIST)\lib\jrt$(MOZ_BITS)$(VERSION_NUMBER).lib \
  56.     $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib
  57. !else
  58. LLIBS=$(LIBNSPR) $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib
  59. !endif
  60.  
  61. #//------------------------------------------------------------------------
  62. #// 
  63. #// Define the files necessary to build the target (ie. OBJS)
  64. #//
  65. #//------------------------------------------------------------------------
  66. !ifdef MOZ_JAVA
  67. OBJS=                                       \
  68.     .\$(OBJDIR)\jsStubs.obj                 \
  69.     .\$(OBJDIR)\jsjava.obj                  \
  70.     .\$(OBJDIR)\jsjsa.obj                   \
  71.     .\$(OBJDIR)\stubs.obj                   \
  72. !if "$(MOZ_BITS)" == "16"
  73.     .\$(OBJDIR)\jsj_nodl.obj                \
  74. !endif
  75.     $(NULL)
  76. !else
  77. OBJS=                                       \
  78.     .\$(OBJDIR)\jsjava.obj                  \
  79.     .\$(OBJDIR)\jsStubs.obj                 \
  80.     $(NULL)
  81. !endif # MOZ_JAVA
  82. #
  83.  
  84. #//------------------------------------------------------------------------
  85. #//
  86. #// install headers
  87. #//
  88. #//------------------------------------------------------------------------
  89. INSTALL_DIR=$(PUBLIC)\js
  90. INSTALL_FILE_LIST=    \
  91.     jsjava.h
  92.  
  93. #//------------------------------------------------------------------------
  94. #//
  95. #// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
  96. #// (these must be defined before the common makefiles are included)
  97. #//          
  98. #//------------------------------------------------------------------------
  99.  
  100. JRI_GEN=                            \
  101.     netscape.javascript.JSObject            \
  102.     netscape.javascript.JSException         \
  103.     $(NULL)
  104.  
  105. MODULE = java
  106. !ifdef MOZ_JAVA
  107. EXPORTS =                       \
  108.     $(JRI_GEN_DIR)/netscape_javascript_JSObject.h    \
  109.     $(JRI_GEN_DIR)/netscape_javascript_JSException.h \
  110.     $(NULL)
  111. !endif
  112.  
  113.  
  114. #//------------------------------------------------------------------------
  115. #//
  116. #// Define any local options for the make tools 
  117. #//     (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
  118. #//
  119. #//------------------------------------------------------------------------
  120.  
  121. LINCS=$(LINCS) -I_jri \
  122.                -I$(PUBLIC)\js \
  123.                -I$(PUBLIC)\java \
  124.     $(NULL)
  125.  
  126. #!ifdef SERVER_BUILD
  127. #LLIBS=$(DIST)/lib/httpdlw.lib $(DIST)/lib/libsjboot.lib
  128. #!endif
  129.  
  130. #//------------------------------------------------------------------------
  131. #//
  132. #// Include the common makefile rules
  133. #//
  134. #//------------------------------------------------------------------------
  135. include <$(DEPTH)/config/rules.mak>
  136.  
  137. export:: $(DLL) INSTALL_FILES
  138.     $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
  139.     $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
  140.  
  141. clobber::
  142.     $(RM_R) _jri 
  143.  
  144. !ifdef MOZ_JAVA
  145. .\$(OBJDIR)\stubs.obj:                     \
  146.     $(JRI_GEN_DIR)\netscape_javascript_JSObject.c     \
  147.     $(JRI_GEN_DIR)\netscape_javascript_JSException.c \
  148.         $(NULL)
  149. !endif
  150.  
  151. ####
  152. # this bit of extreme scariness came from the js/src makefile
  153. #  reproduced here since that's where jsjava.c lives now...
  154.  
  155. !if ("$(MOZ_BITS)" == "16") 
  156. #//
  157. #// Win16 Hoovers SO BAD!!!   
  158. #//
  159.  
  160. !if !defined(MOZ_DEBUG)
  161. #//
  162. #// We must turn off codeview debug info so jni.c can build.  
  163. #// Otherwise the linker gives errors about data in the $SYMBOLS 
  164. #// segment being beyond a segment boundary.
  165. #//
  166. $(OBJDIR)\jsjava.obj: jsjava.c
  167.     @$(CC) @<<$(CFGFILE)
  168.         -c 
  169.         -Od 
  170.         $(CFLAGS)
  171.         $(LCFLAGS)
  172.         $(LINCS) 
  173.         $(LINCS_1) 
  174.         $(INCS)
  175.         -Fd$(PDBFILE)
  176.         -Fo.\$(OBJDIR)\
  177.         $(*B).c
  178. <<KEEP
  179. !endif
  180. !endif
  181.