Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / js / src / liveconnect / Makefile.ref
blobe1bb126dcf522cc04e8496cf825e48244fe63ec5
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
14 # License.
16 # The Original Code is Mozilla Communicator client code, released
17 # March 31, 1998.
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.
24 # Contributor(s):
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.
44 DEPTH = ..
46 # Create JAR file
47 DIRS += classes
50 # XCFLAGS may be set in the environment or on the gmake command line
52 CFLAGS          += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) \
53                   -DJSFILE $(XCFLAGS)
54 LDFLAGS         += -lm $(XLDFLAGS)
56 # For purify
57 PURE_CFLAGS     = -DXP_UNIX $(OPTIMIZER) $(PURE_OS_CFLAGS) $(DEFINES) \
58                   $(INCLUDES) $(XCFLAGS)
61 # LC file lists
63 LC_HFILES =             \
64         jsj_hash.h      \
65         jsj_private.h   \
66         jsjava.h        \
67         netscape_javascript_JSObject.h \
68         nsCLiveconnectFactory.h        \
69         nsILiveconnect.h               \
70         nsISecureLiveconnect.h         \
71         nsISecurityContext.h           \
72         $(NULL)
74 OTHER_HFILES =          \
75         jsj.msg         \
76         $(NULL)
78 HFILES = $(LC_HFILES) $(OTHER_HFILES)
80 LC_CFILES =     \
81         jsj.c \
82         jsj_JSObject.c \
83         jsj_JavaArray.c \
84         jsj_JavaClass.c \
85         jsj_JavaMember.c \
86         jsj_JavaObject.c \
87         jsj_JavaPackage.c \
88         jsj_array.c \
89         jsj_class.c \
90         jsj_convert.c \
91         jsj_field.c \
92         jsj_hash.c \
93         jsj_method.c \
94         jsj_utils.c \
95         $(NULL)
97 LIB_CFILES  = $(LC_CFILES)
99 PROG_FILE = js
101 include $(DEPTH)/config.mk
102 include config/$(OS_CONFIG).mk
104 INCLUDES   += -I. -I.. -I../$(OBJDIR)
106 ifdef USE_MSVC
107 OTHER_LIBS += $(DEPTH)/fdlibm/$(OBJDIR)/fdlibm.lib
108 else
109 OTHER_LIBS += -L$(DEPTH)/fdlibm/$(OBJDIR) -lfdm -L../$(OBJDIR) -ljs
110 endif
113 # Line editing support.
114 # Define JS_READLINE or JS_EDITLINE to enable line editing in the
115 # lcshell command-line interpreter.
117 ifdef JS_READLINE
118 # For those platforms with the readline library installed.
119 DEFINES += -DEDITLINE
120 OTHER_LIBS += -lreadline
121 else
122 ifdef JS_EDITLINE
123 # Use the editline library from ../editline.
124 PREDIRS += ../editline
125 DEFINES += -DEDITLINE
126 OTHER_LIBS += -L../editline/$(OBJDIR) -ledit
127 endif
128 endif
130 NSPR_LIBSUFFIX = 4
132 ifdef JS_THREADSAFE
133 DEFINES += -DJS_THREADSAFE
134 INCLUDES += -I../../../dist/$(OBJDIR)/include
135 ifdef USE_MSVC
136 OTHER_LIBS += $(DEPTH)/../../dist/$(OBJDIR)/lib/libnspr${NSPR_LIBSUFFIX}.lib
137 else
138 OTHER_LIBS += -L$(DEPTH)/../../dist/$(OBJDIR)/lib -lnspr${NSPR_LIBSUFFIX}
139 endif
140 endif
142 ifdef USE_MSVC
143 LIBRARY = $(OBJDIR)/jsj.lib
144 SHARED_LIBRARY = $(OBJDIR)/jsj.dll
145 PROGRAM = $(OBJDIR)/lcshell.exe
146 else
147 LIBRARY = $(OBJDIR)/libjsj.a
148 SHARED_LIBRARY = $(OBJDIR)/libjsj.$(SO_SUFFIX)
149 PROGRAM = $(OBJDIR)/lcshell
150 endif
152 include $(DEPTH)/rules.mk
154 ifdef USE_MSVC
155 $(OBJDIR)/$(PROG_FILE)_lc.obj: ../$(PROG_FILE).c
156         @$(MAKE_OBJDIR)
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) $?
161 else
162 $(OBJDIR)/$(PROG_FILE).o: ../$(PROG_FILE).c
163         @$(MAKE_OBJDIR)
164         $(CC) -o $@ -c $(CFLAGS) -DLIVECONNECT ../$(PROG_FILE).c
166 $(PROGRAM): $(OBJDIR)/$(PROG_FILE).o $(OBJDIR)/jsj_simpleapi.o
167         @$(MAKE_OBJDIR)
168         $(CC) -o $@ $(CFLAGS) $+ $(LIBRARY) ../$(OBJDIR)/libjs.a $(LDFLAGS) $(OTHER_LIBS)
169 endif