1 # -*- Mode: makefile -*-
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
16 # The Original Code is Mozilla Communicator client code, released
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1998
22 # the Initial Developer. All Rights Reserved.
26 # Alternatively, the contents of this file may be used under the terms of
27 # either of the GNU General Public License Version 2 or later (the "GPL"),
28 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
41 # JSRef GNUmake makefile.
50 # XCFLAGS may be set in the environment or on the gmake command line
52 CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) \
54 LDFLAGS += -lm $(XLDFLAGS)
57 PURE_CFLAGS = -DXP_UNIX $(OPTIMIZER) $(PURE_OS_CFLAGS) $(DEFINES) \
58 $(INCLUDES) $(XCFLAGS)
67 netscape_javascript_JSObject.h \
68 nsCLiveconnectFactory.h \
70 nsISecureLiveconnect.h \
71 nsISecurityContext.h \
78 HFILES = $(LC_HFILES) $(OTHER_HFILES)
97 LIB_CFILES = $(LC_CFILES)
101 include $(DEPTH)/config.mk
102 include config/$(OS_CONFIG).mk
104 INCLUDES += -I. -I.. -I../$(OBJDIR)
107 OTHER_LIBS += $(DEPTH)/fdlibm/$(OBJDIR)/fdlibm.lib
109 OTHER_LIBS += -L$(DEPTH)/fdlibm/$(OBJDIR) -lfdm -L../$(OBJDIR) -ljs
113 # Line editing support.
114 # Define JS_READLINE or JS_EDITLINE to enable line editing in the
115 # lcshell command-line interpreter.
118 # For those platforms with the readline library installed.
119 DEFINES += -DEDITLINE
120 OTHER_LIBS += -lreadline
123 # Use the editline library from ../editline.
124 PREDIRS += ../editline
125 DEFINES += -DEDITLINE
126 OTHER_LIBS += -L../editline/$(OBJDIR) -ledit
133 DEFINES += -DJS_THREADSAFE
134 INCLUDES += -I../../../dist/$(OBJDIR)/include
136 OTHER_LIBS += $(DEPTH)/../../dist/$(OBJDIR)/lib/libnspr${NSPR_LIBSUFFIX}.lib
138 OTHER_LIBS += -L$(DEPTH)/../../dist/$(OBJDIR)/lib -lnspr${NSPR_LIBSUFFIX}
143 LIBRARY = $(OBJDIR)/jsj.lib
144 SHARED_LIBRARY = $(OBJDIR)/jsj.dll
145 PROGRAM = $(OBJDIR)/lcshell.exe
147 LIBRARY = $(OBJDIR)/libjsj.a
148 SHARED_LIBRARY = $(OBJDIR)/libjsj.$(SO_SUFFIX)
149 PROGRAM = $(OBJDIR)/lcshell
152 include $(DEPTH)/rules.mk
155 $(OBJDIR)/$(PROG_FILE)_lc.obj: ../$(PROG_FILE).c
157 $(CC) -Fo$@ -c $(CFLAGS) -DLIVECONNECT ../$(PROG_FILE).c
159 $(PROGRAM): $(OBJDIR)/$(PROG_FILE)_lc.obj $(OBJDIR)/jsj_simpleapi.obj $(LIBRARY)
160 link.exe -out:"$@" $(EXE_LINK_FLAGS) ../$(OBJDIR)/js32.lib $(OTHER_LIBS) $?
162 $(OBJDIR)/$(PROG_FILE).o: ../$(PROG_FILE).c
164 $(CC) -o $@ -c $(CFLAGS) -DLIVECONNECT ../$(PROG_FILE).c
166 $(PROGRAM): $(OBJDIR)/$(PROG_FILE).o $(OBJDIR)/jsj_simpleapi.o
168 $(CC) -o $@ $(CFLAGS) $+ $(LIBRARY) ../$(OBJDIR)/libjs.a $(LDFLAGS) $(OTHER_LIBS)