summaryrefslogtreecommitdiff
path: root/Examples/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/Makefile.in')
-rw-r--r--Examples/Makefile.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index d69e20ca8..0849597a9 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -687,16 +687,34 @@ JSINCLUDES = @JSCOREINC@ @JSV8INC@
JSDYNAMICLINKING = @JSCOREDYNAMICLINKING@ @JSV8DYNAMICLINKING@
NODEJS = @NODEJS@
NODEGYP = @NODEGYP@
+ifneq (, $(ENGINE))
+ JSENGINE=$(ENGINE)
+else
+ifneq (, $(NODEJS))
+ JSENGINE=node
+else
+ifneq (, @JSCENABLED@)
+ JSENGINE=jsc
+else
+ifneq (, @JSV8ENABLED@)
+ JSENGINE=v8
+else
+ # Shouldn't happen, but avoid empty value if it does.
+ JSENGINE=node
+endif
+endif
+endif
+endif
# ----------------------------------------------------------------
# Creating and building Javascript wrappers
# ----------------------------------------------------------------
javascript_wrapper:
- $(SWIG) -javascript $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.c $(INTERFACEPATH)
+ $(SWIG) -javascript $(SWIGOPT) -$(JSENGINE) -o $(INTERFACEDIR)$(TARGET)_wrap.c $(INTERFACEPATH)
javascript_wrapper_cpp: $(SRCDIR_SRCS)
- $(SWIG) -javascript -c++ $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.cxx $(INTERFACEPATH)
+ $(SWIG) -javascript -c++ $(SWIGOPT) -$(JSENGINE) -o $(INTERFACEDIR)$(TARGET)_wrap.cxx $(INTERFACEPATH)
javascript_build: $(SRCDIR_SRCS)
$(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)