PageRenderTime 70ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/js/Makefile.ref

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
Unknown | 483 lines | 413 code | 70 blank | 0 comment | 0 complexity | 4168ad38bbec17e834de6a85c8dfe4a0 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. # -*- 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. # JSRef GNUmake makefile.
  44. #
  45. # Note: dependency rules are missing for some files (some
  46. # .h, all .msg, etc.) Re-make clean if in doubt.
  47. #
  48. DEPTH = .
  49. include config.mk
  50. #NS_USE_NATIVE = 1
  51. ifndef NANOJIT_ARCH
  52. $(warning NANOJIT_ARCH not defined in config/$(OS_CONFIG).mk, JIT disabled)
  53. else
  54. ifdef DISABLE_JIT
  55. $(warning disabling JIT per build specification)
  56. else
  57. ENABLE_JIT=1
  58. endif
  59. endif
  60. ifdef ENABLE_JIT
  61. DEFINES += -DJS_TRACER
  62. DEFINES += -DFEATURE_NANOJIT
  63. INCLUDES += -Inanojit
  64. endif
  65. #ifndef BUILD_OPT
  66. #DEFINES += -Ivprof
  67. #endif
  68. ifdef NARCISSUS
  69. DEFINES += -DNARCISSUS
  70. endif
  71. # Look in OBJDIR to find jsautocfg.h, jsautokw.h, and js-config.h
  72. INCLUDES += -I. -I$(OBJDIR)
  73. ifdef JS_THREADSAFE
  74. DEFINES += -DJS_THREADSAFE
  75. INCLUDES += -I$(DIST)/include/nspr
  76. ifdef USE_MSVC
  77. OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
  78. else
  79. OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
  80. endif
  81. endif
  82. ifdef JS_NO_THIN_LOCKS
  83. DEFINES += -DJS_USE_ONLY_NSPR_LOCKS
  84. endif
  85. ifdef JS_HAS_FILE_OBJECT
  86. DEFINES += -DJS_HAS_FILE_OBJECT
  87. endif
  88. ifdef JS_GC_ZEAL
  89. DEFINES += -DJS_GC_ZEAL
  90. endif
  91. #
  92. # XCFLAGS may be set in the environment or on the gmake command line
  93. #
  94. #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS
  95. CFLAGS += $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
  96. LDFLAGS = $(XLDFLAGS)
  97. LDFLAGS += $(OS_LDFLAGS)
  98. ifdef MOZ_SHARK
  99. DEFINES += -DMOZ_SHARK
  100. CFLAGS += -F/System/Library/PrivateFrameworks
  101. LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
  102. endif
  103. ifdef MOZ_CALLGRIND
  104. DEFINES += -DMOZ_CALLGRIND
  105. endif
  106. ifdef MOZ_VTUNE
  107. DEFINES += -DMOZ_VTUNE
  108. CXXFLAGS += -IC:/Program\ Files/Intel/VTune/Analyzer/Include
  109. OTHER_LIBS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
  110. endif
  111. ifndef NO_LIBM
  112. LDFLAGS += -lm
  113. endif
  114. # Prevent floating point errors caused by VC++ optimizations
  115. ifeq ($(OS_ARCH),WINNT)
  116. _MSC_VER = $(shell $(CXX) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
  117. ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
  118. CFLAGS += -Op
  119. else
  120. CFLAGS += -fp:precise
  121. endif
  122. endif # WINNT
  123. #
  124. # Server-related changes :
  125. #
  126. ifdef NES40
  127. DEFINES += -DNES40
  128. endif
  129. #
  130. # Line editing support.
  131. # Define JS_READLINE or JS_EDITLINE to enable line editing in the
  132. # js command-line interpreter.
  133. #
  134. ifdef JS_READLINE
  135. # For those platforms with the readline library installed.
  136. DEFINES += -DEDITLINE
  137. PROG_LIBS += -lreadline -ltermcap
  138. else
  139. ifdef JS_EDITLINE
  140. # Use the editline library, built locally.
  141. PREDIRS += editline
  142. DEFINES += -DEDITLINE
  143. PROG_LIBS += $(OBJDIR)/editline/libedit.a
  144. endif
  145. endif
  146. # For purify
  147. PURE_CFLAGS = -DXP_UNIX $(OPTIMIZER) $(PURE_OS_CFLAGS) $(DEFINES) \
  148. $(INCLUDES) $(XCFLAGS)
  149. #
  150. # JS file lists
  151. #
  152. JS_HFILES = \
  153. jsarray.h \
  154. jsatom.h \
  155. jsbool.h \
  156. jscntxt.h \
  157. jsdate.h \
  158. jsemit.h \
  159. jsexn.h \
  160. jsfun.h \
  161. jsgc.h \
  162. jsinterp.h \
  163. jsiter.h \
  164. jslibmath.h \
  165. jslock.h \
  166. jsmath.h \
  167. jsnum.h \
  168. jsobj.h \
  169. json.h \
  170. jsopcode.h \
  171. jsparse.h \
  172. jsarena.h \
  173. jsclist.h \
  174. jsdhash.h \
  175. jsdtoa.h \
  176. jshash.h \
  177. jslong.h \
  178. jstypes.h \
  179. jsprvtd.h \
  180. jspubtd.h \
  181. jsregexp.h \
  182. jsscan.h \
  183. jsscope.h \
  184. jsscript.h \
  185. jsstr.h \
  186. jsversion.h \
  187. jsxdrapi.h \
  188. jsxml.h \
  189. $(NULL)
  190. ifdef ENABLE_JIT
  191. JS_HFILES += \
  192. jstracer.h \
  193. nanojit/Assembler.h \
  194. nanojit/LIR.h \
  195. nanojit/Native$(NANOJIT_ARCH).h \
  196. nanojit/avmplus.h \
  197. nanojit/vm_fops.h \
  198. nanojit/Fragmento.h \
  199. nanojit/Native.h \
  200. nanojit/RegAlloc.h \
  201. nanojit/nanojit.h \
  202. nanojit/TraceTreeDrawer.h \
  203. $(NULL)
  204. endif
  205. ifndef BUILD_OPT
  206. #JS_HFILES += \
  207. # vprof/vprof.h \
  208. # $(NULL)
  209. endif
  210. API_HFILES = \
  211. jsapi.h \
  212. jsdbgapi.h \
  213. $(NULL)
  214. OTHER_HFILES = \
  215. jsbit.h \
  216. jscompat.h \
  217. jscpucfg.h \
  218. jsotypes.h \
  219. jsstddef.h \
  220. prmjtime.h \
  221. resource.h \
  222. jsopcode.tbl \
  223. jsproto.tbl \
  224. js.msg \
  225. jsshell.msg \
  226. jskeyword.tbl \
  227. $(NULL)
  228. ifdef ENABLE_JIT
  229. OTHER_HFILES += builtins.tbl
  230. endif
  231. ifndef PREBUILT_CPUCFG
  232. OTHER_HFILES += $(OBJDIR)/jsautocfg.h
  233. endif
  234. OTHER_HFILES += $(OBJDIR)/jsautokw.h $(OBJDIR)/js-config.h
  235. HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
  236. JS_CPPFILES = \
  237. jsapi.cpp \
  238. jsarena.cpp \
  239. jsarray.cpp \
  240. jsatom.cpp \
  241. jsbool.cpp \
  242. jscntxt.cpp \
  243. jsdate.cpp \
  244. jsdbgapi.cpp \
  245. jsdhash.cpp \
  246. jsdtoa.cpp \
  247. jsemit.cpp \
  248. jsexn.cpp \
  249. jsfun.cpp \
  250. jsgc.cpp \
  251. jshash.cpp \
  252. jsinterp.cpp \
  253. jsinvoke.cpp \
  254. jsiter.cpp \
  255. jslock.cpp \
  256. jslog2.cpp \
  257. jslong.cpp \
  258. jsmath.cpp \
  259. jsnum.cpp \
  260. jsobj.cpp \
  261. json.cpp \
  262. jsopcode.cpp \
  263. jsparse.cpp \
  264. jsprf.cpp \
  265. jsregexp.cpp \
  266. jsscan.cpp \
  267. jsscope.cpp \
  268. jsscript.cpp \
  269. jsstr.cpp \
  270. jsutil.cpp \
  271. jsxdrapi.cpp \
  272. jsxml.cpp \
  273. prmjtime.cpp \
  274. $(NULL)
  275. ifdef ENABLE_JIT
  276. JS_CPPFILES += \
  277. jsbuiltins.cpp \
  278. jstracer.cpp \
  279. nanojit/Assembler.cpp \
  280. nanojit/Fragmento.cpp \
  281. nanojit/LIR.cpp \
  282. nanojit/Native$(NANOJIT_ARCH).cpp \
  283. nanojit/RegAlloc.cpp \
  284. nanojit/avmplus.cpp \
  285. $(NULL)
  286. ifdef DEBUG
  287. JS_CPPFILES += nanojit/TraceTreeDrawer.cpp
  288. endif
  289. endif
  290. ifndef BUILD_OPT
  291. #JS_CPPFILES += \
  292. # vprof/vprof.cpp \
  293. # $(NULL)
  294. endif
  295. ifdef JS_LIVECONNECT
  296. DIRS += liveconnect
  297. endif
  298. ifdef JS_HAS_FILE_OBJECT
  299. JS_CPPFILES += jsfile.cpp
  300. JS_HFILES += jsfile.h
  301. endif
  302. LIB_CPPFILES = $(JS_CPPFILES)
  303. LIB_ASFILES := $(wildcard *_$(OS_ARCH).s)
  304. PROG_CPPFILES = js.cpp
  305. ifdef USE_MSVC
  306. LIBRARY = $(OBJDIR)/js32.lib
  307. SHARED_LIBRARY = $(OBJDIR)/js32.dll
  308. PROGRAM = $(OBJDIR)/js.exe
  309. else
  310. LIBRARY = $(OBJDIR)/libjs.a
  311. SHARED_LIBRARY = $(OBJDIR)/libjs.$(SO_SUFFIX)
  312. PROGRAM = $(OBJDIR)/js
  313. endif
  314. include rules.mk
  315. MOZ_DEPTH = ../..
  316. include jsconfig.mk
  317. nsinstall-target:
  318. cd ../../config; $(MAKE) OBJDIR=$(OBJDIR) OBJDIR_NAME=$(OBJDIR)
  319. #
  320. # Automatic header generation
  321. #
  322. AUTO_HEADERS = \
  323. $(OBJDIR)/jsautokw.h \
  324. $(OBJDIR)/jsautooplen.h \
  325. $(NULL)
  326. $(OBJDIR)/jsautokw.h: jskeyword.tbl
  327. $(OBJDIR)/jsautooplen.h: jsopcode.tbl
  328. GARBAGE += $(AUTO_HEADERS)
  329. GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen$(HOST_BIN_SUFFIX))
  330. ifdef USE_MSVC
  331. GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.obj)
  332. $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
  333. @$(MAKE_OBJDIR)
  334. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(OPTIMIZER) $<
  335. link.exe -out:"$(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX)" $(EXE_LINK_FLAGS) $(OBJDIR)/js$*gen.obj
  336. $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
  337. else
  338. GARBAGE += $(AUTO_HEADERS:$(OBJDIR)/jsauto%.h=$(OBJDIR)/js%gen.d)
  339. $(AUTO_HEADERS): $(OBJDIR)/jsauto%.h: js%gen.cpp
  340. @$(MAKE_OBJDIR)
  341. $(CXX) -o $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $(CFLAGS) $(OPTIMIZER) $(LDFLAGS) $<
  342. $(OBJDIR)/js$*gen$(HOST_BIN_SUFFIX) $@
  343. endif
  344. # force creation of autoheaders before compiling any source that may use them
  345. $(LIB_OBJS) : $(AUTO_HEADERS)
  346. #
  347. # An installed header file describing configuration options that affect
  348. # the API.
  349. #
  350. # Avoid rebuilding unless js-config.h's contents actually change. The
  351. # timestamp on js-config.h.stamp corresponds to the last time we
  352. # checked that js-config.h was up to date. If the stamp changes but
  353. # js-config.h does not, then make concludes that targets depending on
  354. # js-config.h don't need to be rebuilt. The dummy '@true' rule here
  355. # keeps make from concluding that js-config.h never changes.
  356. $(OBJDIR)/js-config.h: $(OBJDIR)/js-config.h.stamp
  357. @true
  358. js-config-switch=$(if $(value $($1)),-e 's/\#undef $1/\#define $1/')
  359. $(OBJDIR)/js-config.h.stamp: js-config.h.in Makefile.ref
  360. sed < $< > $(@:.stamp=.tmp) \
  361. $(call js-config-switch,JS_THREADSAFE) \
  362. $(call js-config-switch,JS_GC_ZEAL) \
  363. -e :dummy
  364. if ! [ -f $(@:.stamp=) ] || ! cmp $(@:.stamp=.tmp) $(@:.stamp=); then \
  365. mv $(@:.stamp=.tmp) $(@:.stamp=); \
  366. fi
  367. touch $@
  368. GARBAGE += $(OBJDIR)/js-config.h $(OBJDIR)/js-config.h.stamp
  369. # Force creation of js-config.h before compiling any source that may use it.
  370. $(LIB_OBJS) : $(OBJDIR)/js-config.h
  371. #
  372. # JS shell executable
  373. #
  374. ifdef USE_MSVC
  375. $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
  376. link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
  377. else
  378. $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
  379. $(CXX) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
  380. $(PROG_LIBS)
  381. endif
  382. $(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)
  383. purify $(PUREFLAGS) \
  384. $(CXX) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
  385. $(OTHER_LIBS) $(PROG_LIBS)
  386. ifndef PREBUILT_CPUCFG
  387. $(filter-out jscpucfg.h $(OBJDIR)/jsautocfg.h, $(HFILES)) $(CPPFILES): $(OBJDIR)/jsautocfg.h
  388. $(OBJDIR)/jsautocfg.h: $(OBJDIR)/jscpucfg
  389. rm -f $@
  390. $(OBJDIR)/jscpucfg > $@
  391. $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
  392. $(CXX) $(OS_LDFLAGS) -o $@ $(OBJDIR)/jscpucfg.o
  393. GARBAGE += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
  394. $(OBJDIR)/jscpucfg.o $(OBJDIR)/jscpucfg.d
  395. endif
  396. # Automatic make dependencies files
  397. DEPENDENCIES = $(CPPFILES:%.cpp=$(OBJDIR)/%.d)
  398. #
  399. # Hardwire dependencies for some files
  400. #
  401. ifdef USE_MSVC
  402. OBJ=obj
  403. else
  404. OBJ=o
  405. endif
  406. $(OBJDIR)/jsinvoke.$(OBJ): jsinterp.h jsinterp.cpp
  407. $(OBJDIR)/jsinvoke.obj : jsinterp.h jsinterp.cpp
  408. -include $(DEPENDENCIES)
  409. TARNAME = jsref.tar
  410. TARFILES = files `cat files`
  411. SUFFIXES: .i
  412. %.i: %.cpp
  413. $(CXX) -C -E $(CFLAGS) $< > $*.i