PageRenderTime 135ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/js/rules.mk

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
Makefile | 206 lines | 133 code | 27 blank | 46 comment | 4 complexity | adcdb0684ae647a86f7ccd4c665aae4c 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. #
  3. # ***** BEGIN LICENSE BLOCK *****
  4. # Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5. #
  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/
  10. #
  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.
  15. #
  16. # The Original Code is Mozilla Communicator client code, released
  17. # March 31, 1998.
  18. #
  19. # The Initial Developer of the Original Code is
  20. # Netscape Communications Corporation.
  21. # Portions created by the Initial Developer are Copyright (C) 1998-1999
  22. # the Initial Developer. All Rights Reserved.
  23. #
  24. # Contributor(s):
  25. # Michael Ang <mang@subcarrier.org>
  26. #
  27. # Alternatively, the contents of this file may be used under the terms of
  28. # either of the GNU General Public License Version 2 or later (the "GPL"),
  29. # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30. # in which case the provisions of the GPL or the LGPL are applicable instead
  31. # of those above. If you wish to allow use of your version of this file only
  32. # under the terms of either the GPL or the LGPL, and not to allow others to
  33. # use your version of this file under the terms of the MPL, indicate your
  34. # decision by deleting the provisions above and replace them with the notice
  35. # and other provisions required by the GPL or the LGPL. If you do not delete
  36. # the provisions above, a recipient may use your version of this file under
  37. # the terms of any one of the MPL, the GPL or the LGPL.
  38. #
  39. # ***** END LICENSE BLOCK *****
  40. #
  41. # JSRef GNUmake makefile rules
  42. #
  43. ifdef USE_MSVC
  44. LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.obj))
  45. PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.obj))
  46. else
  47. LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.o))
  48. LIB_OBJS += $(addprefix $(OBJDIR)/, $(LIB_ASFILES:.s=.o))
  49. PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.o))
  50. endif
  51. CPPFILES = $(LIB_CPPFILES) $(PROG_CPPFILES)
  52. OBJS = $(LIB_OBJS) $(PROG_OBJS)
  53. ifdef USE_MSVC
  54. # TARGETS = $(LIBRARY) # $(PROGRAM) not supported for MSVC yet
  55. TARGETS += $(SHARED_LIBRARY) $(PROGRAM) # it is now
  56. else
  57. TARGETS += $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
  58. endif
  59. all:
  60. +$(LOOP_OVER_PREDIRS)
  61. ifneq "$(strip $(TARGETS))" ""
  62. $(MAKE) -f Makefile.ref $(TARGETS)
  63. endif
  64. +$(LOOP_OVER_DIRS)
  65. $(OBJDIR)/%: %.cpp
  66. @$(MAKE_OBJDIR)
  67. $(CXX) -o $@ $(CFLAGS) $(OPTIMIZER) $< $(LDFLAGS)
  68. # This rule must come before the rule with no dep on header
  69. $(OBJDIR)/%.o: %.cpp %.h
  70. @$(MAKE_OBJDIR)
  71. $(CXX) -o $@ -c $(CFLAGS) $(OPTIMIZER) $<
  72. $(OBJDIR)/jsinterp.o: jsinterp.cpp jsinterp.h
  73. @$(MAKE_OBJDIR)
  74. $(CXX) -o $@ -c $(CFLAGS) $(INTERP_OPTIMIZER) jsinterp.cpp
  75. $(OBJDIR)/jsbuiltins.o: jsbuiltins.cpp jsinterp.h
  76. @$(MAKE_OBJDIR)
  77. $(CXX) -o $@ -c $(CFLAGS) $(BUILTINS_OPTIMIZER) jsbuiltins.cpp
  78. $(OBJDIR)/%.o: %.cpp
  79. @$(MAKE_OBJDIR)
  80. $(CXX) -o $@ -c $(CFLAGS) $(OPTIMIZER) $<
  81. $(OBJDIR)/%.o: %.s
  82. @$(MAKE_OBJDIR)
  83. $(AS) -o $@ $(ASFLAGS) $<
  84. # This rule must come before rule with no dep on header
  85. $(OBJDIR)/%.obj: %.cpp %.h
  86. @$(MAKE_OBJDIR)
  87. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $(OPTIMIZER) $<
  88. $(OBJDIR)/jsinterp.obj: jsinterp.cpp jsinterp.h
  89. @$(MAKE_OBJDIR)
  90. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $(INTERP_OPTIMIZER) jsinterp.cpp
  91. $(OBJDIR)/jsbuiltins.obj: jsbuiltins.cpp jsinterp.h
  92. @$(MAKE_OBJDIR)
  93. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $(BUILTINS_OPTIMIZER) jsbuiltins.cpp
  94. $(OBJDIR)/%.obj: %.cpp
  95. @$(MAKE_OBJDIR)
  96. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $(OPTIMIZER) $<
  97. $(OBJDIR)/js.obj: js.cpp
  98. @$(MAKE_OBJDIR)
  99. $(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(OPTIMIZER) $<
  100. ifeq ($(OS_ARCH),OS2)
  101. $(LIBRARY): $(LIB_OBJS)
  102. $(AR) $@ $? $(AR_OS2_SUFFIX)
  103. $(RANLIB) $@
  104. else
  105. ifdef USE_MSVC
  106. $(SHARED_LIBRARY): $(LIB_OBJS)
  107. link.exe $(LIB_LINK_FLAGS) /base:0x61000000 $(OTHER_LIBS) \
  108. /out:"$@" /pdb:none\
  109. /implib:"$(OBJDIR)/$(@F:.dll=.lib)" $^
  110. else
  111. $(LIBRARY): $(LIB_OBJS)
  112. $(AR) rv $@ $?
  113. $(RANLIB) $@
  114. $(SHARED_LIBRARY): $(LIB_OBJS)
  115. $(MKSHLIB) -o $@ $(LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
  116. endif
  117. endif
  118. # Java stuff
  119. $(CLASSDIR)/$(OBJDIR)/$(JARPATH)/%.class: %.java
  120. mkdir -p $(@D)
  121. $(JAVAC) $(JAVAC_FLAGS) $<
  122. define MAKE_OBJDIR
  123. if test ! -d $(@D); then rm -rf $(@D); mkdir -p $(@D); fi
  124. endef
  125. ifdef DIRS
  126. LOOP_OVER_DIRS = \
  127. @for d in $(DIRS); do \
  128. if test -d $$d; then \
  129. set -e; \
  130. echo "cd $$d; $(MAKE) -f Makefile.ref $@"; \
  131. cd $$d; $(MAKE) -f Makefile.ref $@; cd ..; \
  132. set +e; \
  133. else \
  134. echo "Skipping non-directory $$d..."; \
  135. fi; \
  136. done
  137. endif
  138. ifdef PREDIRS
  139. LOOP_OVER_PREDIRS = \
  140. @for d in $(PREDIRS); do \
  141. if test -d $$d; then \
  142. set -e; \
  143. echo "cd $$d; $(MAKE) -f Makefile.ref $@"; \
  144. cd $$d; $(MAKE) -f Makefile.ref $@; cd ..; \
  145. set +e; \
  146. else \
  147. echo "Skipping non-directory $$d..."; \
  148. fi; \
  149. done
  150. endif
  151. export:
  152. +$(LOOP_OVER_PREDIRS)
  153. mkdir -p $(DIST)/include $(DIST)/$(LIBDIR) $(DIST)/bin
  154. ifneq "$(strip $(HFILES))" ""
  155. $(CP) $(HFILES) $(DIST)/include
  156. endif
  157. ifneq "$(strip $(LIBRARY))" ""
  158. $(CP) $(LIBRARY) $(DIST)/$(LIBDIR)
  159. endif
  160. ifneq "$(strip $(JARS))" ""
  161. $(CP) $(JARS) $(DIST)/$(LIBDIR)
  162. endif
  163. ifneq "$(strip $(SHARED_LIBRARY))" ""
  164. $(CP) $(SHARED_LIBRARY) $(DIST)/$(LIBDIR)
  165. endif
  166. ifneq "$(strip $(PROGRAM))" ""
  167. $(CP) $(PROGRAM) $(DIST)/bin
  168. endif
  169. +$(LOOP_OVER_DIRS)
  170. clean:
  171. +$(LOOP_OVER_PREDIRS)
  172. rm -rf $(OBJS) $(GARBAGE)
  173. clobber:
  174. +$(LOOP_OVER_PREDIRS)
  175. rm -rf $(OBJS) $(TARGETS) $(DEPENDENCIES) $(GARBAGE)
  176. if test -d $(OBJDIR); then rmdir $(OBJDIR); fi
  177. tar:
  178. tar cvf $(TARNAME) $(TARFILES)
  179. gzip $(TARNAME)