mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Return to building spidermonkey as C++, because we believe we found the cause of the perf regression elsewhere (non-code).
--HG-- rename : js/src/js.c => js/src/js.cpp rename : js/src/jsapi.c => js/src/jsapi.cpp rename : js/src/jsarena.c => js/src/jsarena.cpp rename : js/src/jsarray.c => js/src/jsarray.cpp rename : js/src/jsatom.c => js/src/jsatom.cpp rename : js/src/jsbool.c => js/src/jsbool.cpp rename : js/src/jscntxt.c => js/src/jscntxt.cpp rename : js/src/jscpucfg.c => js/src/jscpucfg.cpp rename : js/src/jsdate.c => js/src/jsdate.cpp rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp rename : js/src/jsdhash.c => js/src/jsdhash.cpp rename : js/src/jsdtoa.c => js/src/jsdtoa.cpp rename : js/src/jsemit.c => js/src/jsemit.cpp rename : js/src/jsexn.c => js/src/jsexn.cpp rename : js/src/jsfile.c => js/src/jsfile.cpp rename : js/src/jsfun.c => js/src/jsfun.cpp rename : js/src/jsgc.c => js/src/jsgc.cpp rename : js/src/jshash.c => js/src/jshash.cpp rename : js/src/jsinterp.c => js/src/jsinterp.cpp rename : js/src/jsinvoke.c => js/src/jsinvoke.cpp rename : js/src/jsiter.c => js/src/jsiter.cpp rename : js/src/jskwgen.c => js/src/jskwgen.cpp rename : js/src/jslock.c => js/src/jslock.cpp rename : js/src/jslog2.c => js/src/jslog2.cpp rename : js/src/jslong.c => js/src/jslong.cpp rename : js/src/jsmath.c => js/src/jsmath.cpp rename : js/src/jsnum.c => js/src/jsnum.cpp rename : js/src/jsobj.c => js/src/jsobj.cpp rename : js/src/jsopcode.c => js/src/jsopcode.cpp rename : js/src/jsparse.c => js/src/jsparse.cpp rename : js/src/jsprf.c => js/src/jsprf.cpp rename : js/src/jsregexp.c => js/src/jsregexp.cpp rename : js/src/jsscan.c => js/src/jsscan.cpp rename : js/src/jsscope.c => js/src/jsscope.cpp rename : js/src/jsscript.c => js/src/jsscript.cpp rename : js/src/jsstr.c => js/src/jsstr.cpp rename : js/src/jsutil.c => js/src/jsutil.cpp rename : js/src/jsxdrapi.c => js/src/jsxdrapi.cpp rename : js/src/jsxml.c => js/src/jsxml.cpp rename : js/src/prmjtime.c => js/src/prmjtime.cpp
This commit is contained in:
parent
5068d70767
commit
93076abf3d
@ -968,7 +968,7 @@ else
|
||||
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
||||
$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
else
|
||||
ifdef HOST_CPPSRCS
|
||||
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
|
||||
$(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXXFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
else
|
||||
$(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_CFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
|
@ -46,7 +46,6 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = js
|
||||
LIBRARY_NAME = mozjs
|
||||
LIB_IS_C_ONLY = 1
|
||||
GRE_MODULE = 1
|
||||
|
||||
ifdef GNU_CC
|
||||
@ -88,43 +87,43 @@ ifndef JS_STATIC_BUILD
|
||||
FORCE_SHARED_LIB = 1
|
||||
endif
|
||||
|
||||
CSRCS = \
|
||||
jsapi.c \
|
||||
jsarena.c \
|
||||
jsarray.c \
|
||||
jsatom.c \
|
||||
jsbool.c \
|
||||
jscntxt.c \
|
||||
jsdate.c \
|
||||
jsdbgapi.c \
|
||||
jsdhash.c \
|
||||
jsdtoa.c \
|
||||
jsemit.c \
|
||||
jsexn.c \
|
||||
jsfun.c \
|
||||
jsgc.c \
|
||||
jshash.c \
|
||||
jsinterp.c \
|
||||
jsinvoke.c \
|
||||
jsiter.c \
|
||||
jslock.c \
|
||||
jslog2.c \
|
||||
jslong.c \
|
||||
jsmath.c \
|
||||
jsnum.c \
|
||||
jsobj.c \
|
||||
jsopcode.c \
|
||||
jsparse.c \
|
||||
jsprf.c \
|
||||
jsregexp.c \
|
||||
jsscan.c \
|
||||
jsscope.c \
|
||||
jsscript.c \
|
||||
jsstr.c \
|
||||
jsutil.c \
|
||||
jsxdrapi.c \
|
||||
jsxml.c \
|
||||
prmjtime.c \
|
||||
CPPSRCS = \
|
||||
jsapi.cpp \
|
||||
jsarena.cpp \
|
||||
jsarray.cpp \
|
||||
jsatom.cpp \
|
||||
jsbool.cpp \
|
||||
jscntxt.cpp \
|
||||
jsdate.cpp \
|
||||
jsdbgapi.cpp \
|
||||
jsdhash.cpp \
|
||||
jsdtoa.cpp \
|
||||
jsemit.cpp \
|
||||
jsexn.cpp \
|
||||
jsfun.cpp \
|
||||
jsgc.cpp \
|
||||
jshash.cpp \
|
||||
jsinterp.cpp \
|
||||
jsinvoke.cpp \
|
||||
jsiter.cpp \
|
||||
jslock.cpp \
|
||||
jslog2.cpp \
|
||||
jslong.cpp \
|
||||
jsmath.cpp \
|
||||
jsnum.cpp \
|
||||
jsobj.cpp \
|
||||
jsopcode.cpp \
|
||||
jsparse.cpp \
|
||||
jsprf.cpp \
|
||||
jsregexp.cpp \
|
||||
jsscan.cpp \
|
||||
jsscope.cpp \
|
||||
jsscript.cpp \
|
||||
jsstr.cpp \
|
||||
jsutil.cpp \
|
||||
jsxdrapi.cpp \
|
||||
jsxml.cpp \
|
||||
prmjtime.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifdef HAVE_DTRACE
|
||||
@ -206,7 +205,7 @@ include $(topsrcdir)/config/config.mk
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
||||
|
||||
# When using gcc the assembly is inlined in the C-file (see jslock.c)
|
||||
# When using gcc the assembly is inlined in the C-file (see jslock.cpp)
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
ifneq (86,$(findstring 86,$(OS_TEST)))
|
||||
ifndef GNU_CC
|
||||
@ -237,6 +236,7 @@ JSJAVA_CFLAGS = \
|
||||
|
||||
HOST_SIMPLE_PROGRAMS += host_jskwgen$(HOST_BIN_SUFFIX)
|
||||
GARBAGE += jsautokw.h host_jskwgen$(HOST_BIN_SUFFIX)
|
||||
USE_HOST_CXX = 1
|
||||
|
||||
ifdef HAVE_DTRACE
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
@ -357,27 +357,27 @@ endif
|
||||
ifeq ($(OS_ARCH),IRIX)
|
||||
ifndef GNU_CC
|
||||
_COMPILE_CFLAGS = $(patsubst -O%,-O1,$(COMPILE_CFLAGS))
|
||||
jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.c Makefile.in
|
||||
jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.cpp Makefile.in
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS_AUTO_CC)
|
||||
$(CC) -o $@ -c $(_COMPILE_CFLAGS) $<
|
||||
@$(MAKE_DEPS_AUTO_CXX)
|
||||
$(CXX) -o $@ -c $(_COMPILE_CFLAGS) $<
|
||||
endif
|
||||
endif
|
||||
|
||||
# An AIX Optimization bug causes PR_dtoa() & JS_dtoa to produce wrong result.
|
||||
# This suppresses optimization for this single compilation unit.
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
jsatom.o: jsatom.c Makefile.in
|
||||
jsatom.o: jsatom.cpp Makefile.in
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS_AUTO_CC)
|
||||
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
|
||||
jsdtoa.o: jsdtoa.c Makefile.in
|
||||
@$(MAKE_DEPS_AUTO_CXX)
|
||||
$(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
|
||||
jsdtoa.o: jsdtoa.cpp Makefile.in
|
||||
$(REPORT_BUILD)
|
||||
@$(MAKE_DEPS_AUTO_CC)
|
||||
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
|
||||
@$(MAKE_DEPS_AUTO_CXX)
|
||||
$(CXX) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
|
||||
endif
|
||||
|
||||
jsopcode.h jsopcode.c: jsopcode.tbl
|
||||
jsopcode.h jsopcode.cpp: jsopcode.tbl
|
||||
|
||||
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
|
||||
jsautocfg.h:
|
||||
@ -398,8 +398,8 @@ endif
|
||||
# Needs to be built with the host compiler but needs to include
|
||||
# the mdcpucfg for the target so it needs the appropriate target defines
|
||||
ifdef HOST_NSPR_MDCPUCFG
|
||||
HOST_CC := $(HOST_CC) -DMDCPUCFG=$(TARGET_NSPR_MDCPUCFG)
|
||||
HOST_CFLAGS := $(patsubst -DXP_%,,$(HOST_CFLAGS))
|
||||
HOST_CXX := $(HOST_CXX) -DMDCPUCFG=$(TARGET_NSPR_MDCPUCFG)
|
||||
HOST_CXXFLAGS := $(patsubst -DXP_%,,$(HOST_CXXFLAGS))
|
||||
endif
|
||||
|
||||
ifdef CROSS_COMPILE
|
||||
@ -423,19 +423,19 @@ endif
|
||||
ifeq ($(OS_ARCH),QNX)
|
||||
ifneq ($(OS_TARGET),NTO)
|
||||
# QNX's compiler apparently can't build a binary directly from a source file.
|
||||
jscpucfg.o: jscpucfg.c Makefile.in
|
||||
$(HOST_CC) $(HOST_CFLAGS) -c $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) -o $@ $<
|
||||
jscpucfg.o: jscpucfg.cpp Makefile.in
|
||||
$(HOST_CXX) $(HOST_CXXFLAGS) -c $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) -o $@ $<
|
||||
|
||||
jscpucfg: jscpucfg.o
|
||||
$(HOST_CC) $(HOST_CFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
|
||||
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) -o $@ $<
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
jscpucfg$(HOST_BIN_SUFFIX):
|
||||
echo no need to build jscpucfg $<
|
||||
else
|
||||
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.c Makefile.in
|
||||
$(HOST_CC) $(HOST_CFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(OUTOPTION)$@ $<
|
||||
jscpucfg$(HOST_BIN_SUFFIX): jscpucfg.cpp Makefile.in
|
||||
$(HOST_CXX) $(HOST_CXXFLAGS) $(JSCPUCFG_DEFINES) $(DEFINES) $(NSPR_CFLAGS) $(OUTOPTION)$@ $<
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -100,7 +100,7 @@ endif
|
||||
|
||||
# Prevent floating point errors caused by VC++ optimizations
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
_MSC_VER = $(shell $(CC) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
|
||||
_MSC_VER = $(shell $(CXX) 2>&1 | sed -n 's/.*Compiler Version \([0-9]*\)\.\([0-9]*\).*/\1\2/p')
|
||||
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
|
||||
CFLAGS += -Op
|
||||
else
|
||||
@ -205,43 +205,43 @@ OTHER_HFILES += $(OBJDIR)/jsautokw.h
|
||||
|
||||
HFILES = $(JS_HFILES) $(API_HFILES) $(OTHER_HFILES)
|
||||
|
||||
JS_CFILES = \
|
||||
jsapi.c \
|
||||
jsarena.c \
|
||||
jsarray.c \
|
||||
jsatom.c \
|
||||
jsbool.c \
|
||||
jscntxt.c \
|
||||
jsdate.c \
|
||||
jsdbgapi.c \
|
||||
jsdhash.c \
|
||||
jsdtoa.c \
|
||||
jsemit.c \
|
||||
jsexn.c \
|
||||
jsfun.c \
|
||||
jsgc.c \
|
||||
jshash.c \
|
||||
jsinterp.c \
|
||||
jsinvoke.c \
|
||||
jsiter.c \
|
||||
jslock.c \
|
||||
jslog2.c \
|
||||
jslong.c \
|
||||
jsmath.c \
|
||||
jsnum.c \
|
||||
jsobj.c \
|
||||
jsopcode.c \
|
||||
jsparse.c \
|
||||
jsprf.c \
|
||||
jsregexp.c \
|
||||
jsscan.c \
|
||||
jsscope.c \
|
||||
jsscript.c \
|
||||
jsstr.c \
|
||||
jsutil.c \
|
||||
jsxdrapi.c \
|
||||
jsxml.c \
|
||||
prmjtime.c \
|
||||
JS_CPPFILES = \
|
||||
jsapi.cpp \
|
||||
jsarena.cpp \
|
||||
jsarray.cpp \
|
||||
jsatom.cpp \
|
||||
jsbool.cpp \
|
||||
jscntxt.cpp \
|
||||
jsdate.cpp \
|
||||
jsdbgapi.cpp \
|
||||
jsdhash.cpp \
|
||||
jsdtoa.cpp \
|
||||
jsemit.cpp \
|
||||
jsexn.cpp \
|
||||
jsfun.cpp \
|
||||
jsgc.cpp \
|
||||
jshash.cpp \
|
||||
jsinterp.cpp \
|
||||
jsinvoke.cpp \
|
||||
jsiter.cpp \
|
||||
jslock.cpp \
|
||||
jslog2.cpp \
|
||||
jslong.cpp \
|
||||
jsmath.cpp \
|
||||
jsnum.cpp \
|
||||
jsobj.cpp \
|
||||
jsopcode.cpp \
|
||||
jsparse.cpp \
|
||||
jsprf.cpp \
|
||||
jsregexp.cpp \
|
||||
jsscan.cpp \
|
||||
jsscope.cpp \
|
||||
jsscript.cpp \
|
||||
jsstr.cpp \
|
||||
jsutil.cpp \
|
||||
jsxdrapi.cpp \
|
||||
jsxml.cpp \
|
||||
prmjtime.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifdef JS_LIVECONNECT
|
||||
@ -249,13 +249,13 @@ DIRS += liveconnect
|
||||
endif
|
||||
|
||||
ifdef JS_HAS_FILE_OBJECT
|
||||
JS_CFILES += jsfile.c
|
||||
JS_CPPFILES += jsfile.cpp
|
||||
JS_HFILES += jsfile.h
|
||||
endif
|
||||
|
||||
LIB_CFILES = $(JS_CFILES)
|
||||
LIB_CPPFILES = $(JS_CPPFILES)
|
||||
LIB_ASFILES := $(wildcard *_$(OS_ARCH).s)
|
||||
PROG_CFILES = js.c
|
||||
PROG_CPPFILES = js.cpp
|
||||
|
||||
ifdef USE_MSVC
|
||||
LIBRARY = $(OBJDIR)/js32.lib
|
||||
@ -284,28 +284,28 @@ GARBAGE += $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
|
||||
|
||||
$(OBJDIR)/jsscan.$(OBJ_SUFFIX): $(OBJDIR)/jsautokw.h jskeyword.tbl
|
||||
|
||||
$(OBJDIR)/jskwgen.$(OBJ_SUFFIX): jskwgen.c jskeyword.tbl
|
||||
$(OBJDIR)/jskwgen.$(OBJ_SUFFIX): jskwgen.cpp jskeyword.tbl
|
||||
|
||||
$(OBJDIR)/jsautokw.h: $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX) jskeyword.tbl
|
||||
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX) $@
|
||||
|
||||
ifdef USE_MSVC
|
||||
|
||||
$(OBJDIR)/jskwgen.obj: jskwgen.c jskeyword.tbl
|
||||
$(OBJDIR)/jskwgen.obj: jskwgen.cpp jskeyword.tbl
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
|
||||
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
|
||||
|
||||
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
|
||||
link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
|
||||
|
||||
else
|
||||
|
||||
$(OBJDIR)/jskwgen.o: jskwgen.c jskeyword.tbl
|
||||
$(OBJDIR)/jskwgen.o: jskwgen.cpp jskeyword.tbl
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
$(CXX) -o $@ -c $(CFLAGS) $<
|
||||
|
||||
$(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
|
||||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
$(CXX) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
endif
|
||||
|
||||
@ -318,24 +318,24 @@ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
|
||||
link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
|
||||
else
|
||||
$(PROGRAM): $(PROG_OBJS) $(LIBRARY)
|
||||
$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
|
||||
$(CXX) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
|
||||
$(PROG_LIBS)
|
||||
endif
|
||||
|
||||
$(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY)
|
||||
purify $(PUREFLAGS) \
|
||||
$(CC) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
|
||||
$(CXX) -o $@ $(PURE_OS_CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) \
|
||||
$(OTHER_LIBS) $(PROG_LIBS)
|
||||
|
||||
ifndef PREBUILT_CPUCFG
|
||||
$(HFILES) $(CFILES): $(OBJDIR)/jsautocfg.h
|
||||
$(HFILES) $(CPPFILES): $(OBJDIR)/jsautocfg.h
|
||||
|
||||
$(OBJDIR)/jsautocfg.h: $(OBJDIR)/jscpucfg
|
||||
rm -f $@
|
||||
$(OBJDIR)/jscpucfg > $@
|
||||
|
||||
$(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
|
||||
$(CC) -o $@ $(OBJDIR)/jscpucfg.o
|
||||
$(CXX) -o $@ $(OBJDIR)/jscpucfg.o
|
||||
|
||||
# Add to TARGETS for clobber rule
|
||||
TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
|
||||
@ -349,9 +349,9 @@ DEPENDENCIES = $(CFILES:%.c=$(OBJDIR)/%.d)
|
||||
# Hardwire dependencies for jsinvoke.c
|
||||
#
|
||||
ifdef USE_MSVC
|
||||
$(OBJDIR)/jsinvoke.obj : jsinterp.h jsinterp.c
|
||||
$(OBJDIR)/jsinvoke.obj : jsinterp.h jsinterp.cpp
|
||||
else
|
||||
$(OBJDIR)/jsinvoke.o : jsinterp.h jsinterp.c
|
||||
$(OBJDIR)/jsinvoke.o : jsinterp.h jsinterp.cpp
|
||||
endif
|
||||
|
||||
-include $(DEPENDENCIES)
|
||||
@ -360,5 +360,5 @@ TARNAME = jsref.tar
|
||||
TARFILES = files `cat files`
|
||||
|
||||
SUFFIXES: .i
|
||||
%.i: %.c
|
||||
$(CC) -C -E $(CFLAGS) $< > $*.i
|
||||
%.i: %.cpp
|
||||
$(CXX) -C -E $(CFLAGS) $< > $*.i
|
||||
|
@ -49,7 +49,7 @@ CFLAGS += -Wall -Wno-format -MMD
|
||||
OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
|
||||
|
||||
RANLIB = ranlib
|
||||
MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System
|
||||
MKSHLIB = $(CCC) -dynamiclib $(XMKSHLIBOPTS) -framework System
|
||||
|
||||
SO_SUFFIX = dylib
|
||||
|
||||
|
@ -40,4 +40,4 @@
|
||||
|
||||
#define js_invoke_c__
|
||||
|
||||
#include "jsinterp.c"
|
||||
#include "jsinterp.cpp"
|
@ -43,15 +43,15 @@
|
||||
#
|
||||
|
||||
ifdef USE_MSVC
|
||||
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CFILES:.c=.obj))
|
||||
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CFILES:.c=.obj))
|
||||
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.obj))
|
||||
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.obj))
|
||||
else
|
||||
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CFILES:.c=.o))
|
||||
LIB_OBJS = $(addprefix $(OBJDIR)/, $(LIB_CPPFILES:.cpp=.o))
|
||||
LIB_OBJS += $(addprefix $(OBJDIR)/, $(LIB_ASFILES:.s=.o))
|
||||
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CFILES:.c=.o))
|
||||
PROG_OBJS = $(addprefix $(OBJDIR)/, $(PROG_CPPFILES:.cpp=.o))
|
||||
endif
|
||||
|
||||
CFILES = $(LIB_CFILES) $(PROG_CFILES)
|
||||
CPPFILES = $(LIB_CPPFILES) $(PROG_CPPFILES)
|
||||
OBJS = $(LIB_OBJS) $(PROG_OBJS)
|
||||
|
||||
ifdef USE_MSVC
|
||||
@ -68,43 +68,43 @@ ifneq "$(strip $(TARGETS))" ""
|
||||
endif
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
$(OBJDIR)/%: %.c
|
||||
$(OBJDIR)/%: %.cpp
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(CFLAGS) $*.c $(LDFLAGS)
|
||||
$(CXX) -o $@ $(CFLAGS) $*.cpp $(LDFLAGS)
|
||||
|
||||
# This rule must come before the rule with no dep on header
|
||||
$(OBJDIR)/%.o: %.c %.h
|
||||
$(OBJDIR)/%.o: %.cpp %.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(CFLAGS) $*.c
|
||||
$(CXX) -o $@ -c $(CFLAGS) $*.cpp
|
||||
|
||||
$(OBJDIR)/jsinterp.o: jsinterp.c jsinterp.h
|
||||
$(OBJDIR)/jsinterp.o: jsinterp.cpp jsinterp.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(INTERP_CFLAGS) jsinterp.c
|
||||
$(CXX) -o $@ -c $(INTERP_CFLAGS) jsinterp.cpp
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -c $(CFLAGS) $*.c
|
||||
$(CXX) -o $@ -c $(CFLAGS) $*.cpp
|
||||
|
||||
$(OBJDIR)/%.o: %.s
|
||||
@$(MAKE_OBJDIR)
|
||||
$(AS) -o $@ $(ASFLAGS) $*.s
|
||||
|
||||
# This rule must come before rule with no dep on header
|
||||
$(OBJDIR)/%.obj: %.c %.h
|
||||
$(OBJDIR)/%.obj: %.cpp %.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
|
||||
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.cpp
|
||||
|
||||
$(OBJDIR)/jsinterp.obj: jsinterp.c jsinterp.h
|
||||
$(OBJDIR)/jsinterp.obj: jsinterp.cpp jsinterp.h
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(INTERP_CFLAGS) $(JSDLL_CFLAGS) jsinterp.c
|
||||
$(CXX) -Fo$(OBJDIR)/ -c $(INTERP_CFLAGS) $(JSDLL_CFLAGS) jsinterp.c
|
||||
|
||||
$(OBJDIR)/%.obj: %.c
|
||||
$(OBJDIR)/%.obj: %.cpp
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
|
||||
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.cpp
|
||||
|
||||
$(OBJDIR)/js.obj: js.c
|
||||
$(OBJDIR)/js.obj: js.cpp
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
|
||||
$(CXX) -Fo$(OBJDIR)/ -c $(CFLAGS) $<
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
$(LIBRARY): $(LIB_OBJS)
|
||||
|
Loading…
Reference in New Issue
Block a user