/[jscoverage]/trunk/js/Makefile.ref
ViewVC logotype

Annotation of /trunk/js/Makefile.ref

Parent Directory Parent Directory | Revision Log Revision Log


Revision 332 - (hide annotations)
Thu Oct 23 19:03:33 2008 UTC (11 years, 11 months ago) by siliconforks
File size: 9895 byte(s)
Add SpiderMonkey from Firefox 3.1b1.

The following directories and files were removed:
correct/, correct.js
liveconnect/
nanojit/
t/
v8/
vprof/
xpconnect/
all JavaScript files (Y.js, call.js, if.js, math-partial-sums.js, md5.js, perfect.js, trace-test.js, trace.js)


1 siliconforks 332 # -*- Mode: makefile -*-
2     # vim: ft=make
3     #
4     # ***** BEGIN LICENSE BLOCK *****
5     # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6     #
7     # The contents of this file are subject to the Mozilla Public License Version
8     # 1.1 (the "License"); you may not use this file except in compliance with
9     # the License. You may obtain a copy of the License at
10     # http://www.mozilla.org/MPL/
11     #
12     # Software distributed under the License is distributed on an "AS IS" basis,
13     # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14     # for the specific language governing rights and limitations under the
15     # License.
16     #
17     # The Original Code is Mozilla Communicator client code, released
18     # March 31, 1998.
19     #
20     # The Initial Developer of the Original Code is
21     # Netscape Communications Corporation.
22     # Portions created by the Initial Developer are Copyright (C) 1998
23     # the Initial Developer. All Rights Reserved.
24     #
25     # Contributor(s):
26     # Michael Ang <mang@subcarrier.org>
27     # Kevin Buhr <buhr@stat.wisc.edu>
28     #
29     # Alternatively, the contents of this file may be used under the terms of
30     # either of the GNU General Public License Version 2 or later (the "GPL"),
31     # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
32     # in which case the provisions of the GPL or the LGPL are applicable instead
33     # of those above. If you wish to allow use of your version of this file only
34     # under the terms of either the GPL or the LGPL, and not to allow others to
35     # use your version of this file under the terms of the MPL, indicate your
36     # decision by deleting the provisions above and replace them with the notice
37     # and other provisions required by the GPL or the LGPL. If you do not delete
38     # the provisions above, a recipient may use your version of this file under
39     # the terms of any one of the MPL, the GPL or the LGPL.
40     #
41     # ***** END LICENSE BLOCK *****
42    
43     #
44     # JSRef GNUmake makefile.
45     #
46     # Note: dependency rules are missing for some files (some
47     # .h, all .msg, etc.) Re-make clean if in doubt.
48     #
49    
50    
51     DEPTH = .
52    
53     include config.mk
54    
55     #NS_USE_NATIVE = 1
56    
57     ifndef NANOJIT_ARCH
58     $(warning NANOJIT_ARCH not defined in config/$(OS_CONFIG).mk, JIT disabled)
59     else
60     ifdef DISABLE_JIT
61     $(warning disabling JIT per build specification)
62     else
63     ENABLE_JIT=1
64     endif
65     endif
66    
67     ifdef ENABLE_JIT
68     DEFINES += -DJS_TRACER
69     DEFINES += -DFEATURE_NANOJIT
70     INCLUDES += -Inanojit
71     endif
72    
73     #ifndef BUILD_OPT
74     #DEFINES += -Ivprof
75     #endif
76    
77     ifdef NARCISSUS
78     DEFINES += -DNARCISSUS
79     endif
80    
81     # Look in OBJDIR to find jsautocfg.h and jsautokw.h
82     INCLUDES += -I. -I$(OBJDIR)
83    
84     ifdef JS_THREADSAFE
85     DEFINES += -DJS_THREADSAFE
86     INCLUDES += -I$(DIST)/include/nspr
87     ifdef USE_MSVC
88     OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
89     else
90     OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
91     endif
92     endif
93    
94     ifdef JS_NO_THIN_LOCKS
95     DEFINES += -DJS_USE_ONLY_NSPR_LOCKS
96     endif
97    
98     ifdef JS_HAS_FILE_OBJECT
99     DEFINES += -DJS_HAS_FILE_OBJECT
100     endif
101    
102    
103     #
104     # XCFLAGS may be set in the environment or on the gmake command line
105     #
106     #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS
107     CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
108     INTERP_CFLAGS += $(INTERP_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(INTERP_XCFLAGS)
109     BUILTINS_CFLAGS += $(BUILTINS_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(BUILTINS_XCFLAGS)
110    
111     LDFLAGS = $(XLDFLAGS)
112     LDFLAGS += $(OS_LDFLAGS)
113    
114     ifdef MOZ_SHARK
115     DEFINES += -DMOZ_SHARK
116     CFLAGS += -F/System/Library/PrivateFrameworks
117     LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
118     endif
119     ifdef MOZ_CALLGRIND
120     DEFINES += -DMOZ_CALLGRIND
121     endif
122     ifdef MOZ_VTUNE
123     DEFINES += -DMOZ_VTUNE
124     CXXFLAGS += -IC:/Program\ Files/Intel/VTune/Analyzer/Include
125     OTHER_LIBS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
126     endif
127    
128     ifndef NO_LIBM
129     LDFLAGS += -lm
130     endif
131    
132     # Prevent floating point errors caused by VC++ optimizations
133     ifeq ($(OS_ARCH),WINNT)
134     _MSC_VER = $(shell $(CXX) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
135     ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
136     CFLAGS += -Op
137     else
138     CFLAGS += -fp:precise
139     endif
140     endif # WINNT
141    
142     #
143     # Server-related changes :
144     #
145     ifdef NES40
146     DEFINES += -DNES40
147     endif
148    
149     #
150     # Line editing support.
151     # Define JS_READLINE or JS_EDITLINE to enable line editing in the
152     # js command-line interpreter.
153     #
154     ifdef JS_READLINE
155     # For those platforms with the readline library installed.
156     DEFINES += -DEDITLINE
157     PROG_LIBS += -lreadline -ltermcap
158     else
159     ifdef JS_EDITLINE
160     # Use the editline library, built locally.
161     PREDIRS += editline
162     DEFINES += -DEDITLINE
163     PROG_LIBS += $(OBJDIR)/editline/libedit.a
164     endif
165     endif
166    
167     # For purify
168     PURE_CFLAGS = -DXP_UNIX $(OPTIMIZER) $(PURE_OS_CFLAGS) $(DEFINES) \
169     $(INCLUDES) $(XCFLAGS)
170    
171     #
172     # JS file lists
173     #
174     JS_HFILES = \
175     jsarray.h \
176     jsatom.h \
177     jsbool.h \
178     jscntxt.h \
179     jsdate.h \
180     jsemit.h \
181     jsexn.h \
182     jsfun.h \
183     jsgc.h \
184     jsinterp.h \
185     jsiter.h \
186     jslibmath.h \
187     jslock.h \
188     jsmath.h \
189     jsnum.h \
190     jsobj.h \
191     json.h \
192     jsopcode.h \
193     jsparse.h \
194     jsarena.h \
195     jsclist.h \
196     jsdhash.h \
197     jsdtoa.h \
198     jshash.h \
199     jslong.h \
200     jstypes.h \
201     jsprvtd.h \
202     jspubtd.h \
203     jsregexp.h \
204     jsscan.h \
205     jsscope.h \
206     jsscript.h \
207     jsstr.h \
208     jsversion.h \
209     jsxdrapi.h \
210     jsxml.h \
211     $(NULL)
212    
213     ifdef ENABLE_JIT
214     JS_HFILES += \
215     jstracer.h \
216     nanojit/Assembler.h \
217     nanojit/LIR.h \
218     nanojit/Native$(NANOJIT_ARCH).h \
219     nanojit/avmplus.h \
220     nanojit/vm_fops.h \
221     nanojit/Fragmento.h \
222     nanojit/Native.h \
223     nanojit/RegAlloc.h \
224     nanojit/nanojit.h \
225     nanojit/TraceTreeDrawer.h \
226     $(NULL)
227     endif
228    
229     ifndef BUILD_OPT
230     #JS_HFILES += \
231     # vprof/vprof.h \
232     # $(NULL)
233     endif
234    
235     API_HFILES = \
236     jsapi.h \
237     jsdbgapi.h \
238     $(NULL)
239    
240     OTHER_HFILES = \
241     jsbit.h \
242     jscompat.h \
243     jscpucfg.h \
244     jsotypes.h \
245     jsstddef.h \
246     prmjtime.h \
247     resource.h \
248     jsopcode.tbl \
249     jsproto.tbl \
250     js.msg \
251     jsshell.msg \
252     jskeyword.tbl \
253     $(NULL)
254    
255     ifdef ENABLE_JIT
256     OTHER_HFILES += builtins.tbl
257     endif
258    
259     ifndef PREBUILT_CPUCFG
260     OTHER_HFILES += $(OBJDIR)/jsautocfg.h
261     endif
262     OTHER_HFILES += $(OBJDIR)/jsautokw.h
263    
264     HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
265    
266     JS_CPPFILES = \
267     jsapi.cpp \
268     jsarena.cpp \
269     jsarray.cpp \
270     jsatom.cpp \
271     jsbool.cpp \
272     jscntxt.cpp \
273     jsdate.cpp \
274     jsdbgapi.cpp \
275     jsdhash.cpp \
276     jsdtoa.cpp \
277     jsemit.cpp \
278     jsexn.cpp \
279     jsfun.cpp \
280     jsgc.cpp \
281     jshash.cpp \
282     jsinterp.cpp \
283     jsinvoke.cpp \
284     jsiter.cpp \
285     jslock.cpp \
286     jslog2.cpp \
287     jslong.cpp \
288     jsmath.cpp \
289     jsnum.cpp \
290     jsobj.cpp \
291     json.cpp \
292     jsopcode.cpp \
293     jsparse.cpp \
294     jsprf.cpp \
295     jsregexp.cpp \
296     jsscan.cpp \
297     jsscope.cpp \
298     jsscript.cpp \
299     jsstr.cpp \
300     jsutil.cpp \
301     jsxdrapi.cpp \
302     jsxml.cpp \
303     prmjtime.cpp \
304     $(NULL)
305    
306     ifdef ENABLE_JIT
307     JS_CPPFILES += \
308     jsbuiltins.cpp \
309     jstracer.cpp \
310     nanojit/Assembler.cpp \
311     nanojit/Fragmento.cpp \
312     nanojit/LIR.cpp \
313     nanojit/Native$(NANOJIT_ARCH).cpp \
314     nanojit/RegAlloc.cpp \
315     nanojit/avmplus.cpp \
316     $(NULL)
317    
318     ifdef DEBUG
319     JS_CPPFILES += nanojit/TraceTreeDrawer.cpp
320     endif
321     endif
322    
323     ifndef BUILD_OPT
324     #JS_CPPFILES += \
325     # vprof/vprof.cpp \
326     # $(NULL)
327     endif
328    
329     ifdef JS_LIVECONNECT
330     DIRS += liveconnect
331     endif
332    
333     ifdef JS_HAS_FILE_OBJECT
334     JS_CPPFILES += jsfile.cpp
335     JS_HFILES += jsfile.h
336     endif
337    
338     LIB_CPPFILES = $(JS_CPPFILES)
339     LIB_ASFILES := $(wildcard *_$(OS_ARCH).s)
340     PROG_CPPFILES = js.cpp
341    
342     ifdef USE_MSVC
343     LIBRARY = $(OBJDIR)/js32.lib
344     SHARED_LIBRARY = $(OBJDIR)/js32.dll
345     PROGRAM = $(OBJDIR)/js.exe
346     else
347     LIBRARY = $(OBJDIR)/libjs.a
348     SHARED_LIBRARY = $(OBJDIR)/libjs.$(SO_SUFFIX)
349     PROGRAM = $(OBJDIR)/js
350     endif
351    
352     include rules.mk
353    
354     MOZ_DEPTH = ../..
355     include jsconfig.mk
356    
357     nsinstall-target:
358     cd ../../config; $(MAKE) OBJDIR=$(OBJDIR) OBJDIR_NAME=$(OBJDIR)
359    
360     #
361     # Automatic header generation
362     #
363    
364     AUTO_HEADERS = $(OBJDIR)/jsautokw.h $(OBJDIR)/jsautooplen.h
365    
366     $(OBJDIR)/jsautokw.h: jskeyword.tbl
367    
368     $(OBJDIR)/jsautooplen.h: jsopcode.tbl
369    
370     GARBAGE += $(AUTO_HEADERS)
371     GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen$(HOST_BIN_SUFFIX))
372    
373     ifdef USE_MSVC
374    
375     GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.obj)
376    
377     $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
378     @$(MAKE_OBJDIR)
379     $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
380     link.exe -out:"$(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX)" $(EXE_LINK_FLAGS) $(OBJDIR)/js$*gen.obj
381     $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
382     else
383    
384     GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.d)
385     $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
386     @$(MAKE_OBJDIR)
387     $(CXX) -o $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $(CFLAGS) $(LDFLAGS) $<
388     $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
389    
390     endif
391    
392     # force creation of autoheaders before compiling any source that may use them
393     $(LIB_OBJS) : $(AUTO_HEADERS)
394    
395     #
396     # JS shell executable
397     #
398    
399     ifdef USE_MSVC
400     $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
401     link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
402     else
403     $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
404     $(CXX) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
405     $(PROG_LIBS)
406     endif
407    
408     $(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)
409     purify $(PUREFLAGS) \
410     $(CXX) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
411     $(OTHER_LIBS) $(PROG_LIBS)
412    
413     ifndef PREBUILT_CPUCFG
414     $(filter-out jscpucfg.h $(OBJDIR)/jsautocfg.h, $(HFILES)) $(CPPFILES): $(OBJDIR)/jsautocfg.h
415    
416     $(OBJDIR)/jsautocfg.h: $(OBJDIR)/jscpucfg
417     rm -f $@
418     $(OBJDIR)/jscpucfg > $@
419    
420     $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
421     $(CXX) $(OS_LDFLAGS) -o $@ $(OBJDIR)/jscpucfg.o
422    
423     GARBAGE += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
424     $(OBJDIR)/jscpucfg.o $(OBJDIR)/jscpucfg.d
425     endif
426    
427     # Automatic make dependencies files
428     DEPENDENCIES = $(CPPFILES:%.cpp=$(OBJDIR)/%.d)
429    
430     #
431     # Hardwire dependencies for some files
432     #
433     ifdef USE_MSVC
434     OBJ=obj
435     else
436     OBJ=o
437     endif
438    
439     $(OBJDIR)/jsinvoke.$(OBJ): jsinterp.h jsinterp.cpp
440     $(OBJDIR)/jsinvoke.obj : jsinterp.h jsinterp.cpp
441    
442     -include $(DEPENDENCIES)
443    
444     TARNAME = jsref.tar
445     TARFILES = files `cat files`
446    
447     SUFFIXES: .i
448     %.i: %.cpp
449     $(CXX) -C -E $(CFLAGS) $< > $*.i

  ViewVC Help
Powered by ViewVC 1.1.24