home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / js / src / msgsvrjs.mk < prev    next >
Encoding:
Makefile  |  1998-04-08  |  2.6 KB  |  113 lines

  1. #! gmake
  2.  
  3. #
  4. # Since everyone seems to need to have their own build configuration
  5. #   system these days, this is yet another makefile to build JavaScript.
  6. #   This makefile conforms to the NSPR20 build rules.  If you have built
  7. #   NSPR20 this will build JS and stick the lib and bin files over in 
  8. #   the dist area created by NSPR (which is different from the dist 
  9. #   expected by the client and also the dist expected by LiveWire, but
  10. #   don't get me started).
  11. #
  12. # I don't currently know enough about what sort of JS-engine the Actra
  13. #   projects are going to expect so I don't know if we need to add
  14. #   to CFLAGS for -DJS_THREADSAFE or -DJSFILE 
  15. #
  16.  
  17. MOD_DEPTH = ../../nspr20
  18.  
  19. include $(MOD_DEPTH)/config/config.mk
  20.  
  21. INCLUDES = -I$(DIST)/include
  22. CFLAGS += -DNSPR20 -DJSFILE -DJS_THREADSAFE
  23.  
  24. CSRCS = prmjtime.c \
  25.           jsapi.c \
  26.           jsarray.c \
  27.           jsatom.c \
  28.           jsbool.c \
  29.           jscntxt.c \
  30.           jsdate.c \
  31.           jsdbgapi.c \
  32.           jsemit.c \
  33.           jsfun.c \
  34.           jsgc.c \
  35.           jsinterp.c \
  36.           jsmath.c \
  37.           jsnum.c \
  38.           jsobj.c \
  39.           jsopcode.c \
  40.           jsparse.c \
  41.           jsregexp.c \
  42.           jsscan.c \
  43.           jsscope.c \
  44.           jsscript.c \
  45.           jsstr.c \
  46.           jslock.c \
  47.           $(NULL)
  48.  
  49. HEADERS = jsapi.h \
  50.           jsarray.h \
  51.           jsatom.h \
  52.           jsbool.h \
  53.           jscntxt.h \
  54.           jscompat.h \
  55.           jsconfig.h \
  56.           jsdate.h \
  57.           jsdbgapi.h \
  58.           jsemit.h \
  59.           jsfun.h \
  60.           jsgc.h \
  61.           jsinterp.h \
  62.           jslock.h \
  63.           jsmath.h \
  64.           jsnum.h \
  65.           jsobj.h \
  66.           jsopcode.def \
  67.           jsopcode.h \
  68.           jsparse.h \
  69.           jsprvtd.h \
  70.           jspubtd.h \
  71.           jsregexp.h \
  72.           jsscan.h \
  73.           jsscope.h \
  74.           jsscript.h \
  75.           jsstr.h \
  76.           $(NULL)
  77.  
  78. ifeq ($(OS_ARCH), WINNT)
  79. EXTRA_LIBS += $(DIST)/lib/libnspr$(MOD_VERSION).lib
  80. EXTRA_LIBS += $(DIST)/lib/libplds$(MOD_VERSION).lib
  81. PROGRAM    = js.exe
  82. else
  83. ifeq ($(OS_ARCH), AIX)
  84. EXTRA_LIBS += -L$(DIST)/lib -lnspr$(MOD_VERSION) -lplds$(MOD_VERSION) -ldl -lc_r -lm
  85. else
  86. EXTRA_LIBS += -L$(DIST)/lib -lnspr$(MOD_VERSION)
  87. endif
  88. PROGRAM    = js
  89. endif
  90.  
  91. LIBRARY_NAME    = js
  92. LIBRARY_VERSION    = $(MOD_VERSION)
  93.  
  94. RELEASE_HEADERS = $(HEADERS)
  95. RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
  96. RELEASE_LIBS    = $(TARGETS)
  97.  
  98. include $(MOD_DEPTH)/config/rules.mk
  99.  
  100. $(OBJDIR)/$(PROGRAM):    $(OBJDIR)/js.o
  101.     $(LD) -o $@ $(LFLAGS) $(OBJDIR)/js.o -L$(DIST)/lib -lnspr$(MOD_VERSION) -lplds$(MOD_VERSION) -ljs$(MOD_VERSION) -lm $(OS_LIBS)
  102.  
  103. ifndef BUILD_OPT
  104. JS_TEST    = $(OBJDIR)/$(PROGRAM)
  105. endif
  106.  
  107. export:: $(TARGETS) $(JS_TEST)
  108.     $(INSTALL) -m 444 $(HEADERS) $(MOD_DEPTH)/../dist/public/$(LIBRARY_NAME)
  109.     $(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
  110.     $(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
  111.  
  112. install:: export
  113.