Javascript example Makefiles more consistent with other languages
This commit is contained in:
parent
a5e91f26a1
commit
dbf80cbaa5
15 changed files with 36 additions and 64 deletions
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS =
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,14 +1,5 @@
|
|||
# Note: as a convention an example must be in a child directory of this.
|
||||
# These paths are relative to such an example directory
|
||||
EXAMPLES_TOP=../..
|
||||
SWIG_TOP=../../..
|
||||
|
||||
SWIG = $(SWIG_TOP)/preinst-swig
|
||||
|
||||
# TODO: we could only set these only if not yet set...
|
||||
JS_SCRIPT = runme.js
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
|
||||
ifneq (, $(ENGINE))
|
||||
JSENGINE=$(ENGINE)
|
||||
|
|
@ -16,37 +7,21 @@ else
|
|||
JSENGINE=node
|
||||
endif
|
||||
|
||||
EXAMPLES_TOP=../..
|
||||
SWIG_TOP=../../..
|
||||
SWIG = $(SWIG_TOP)/preinst-swig
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
SWIGOPT=-$(JSENGINE)
|
||||
|
||||
ifeq (node,$(JSENGINE))
|
||||
|
||||
build: wrapper
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' JSENGINE='$(JSENGINE)' javascript_build_node
|
||||
|
||||
else
|
||||
|
||||
build: wrapper
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' JSENGINE='$(JSENGINE)' javascript_build_cpp
|
||||
|
||||
endif
|
||||
|
||||
wrapper:
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' javascript_wrapper_cpp
|
||||
|
||||
ifeq (node,$(JSENGINE))
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile JSENGINE='$(JSENGINE)' javascript_run_node
|
||||
|
||||
else
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile JSENGINE='$(JSENGINE)' TARGET='$(TARGET)' javascript_run
|
||||
|
||||
endif
|
||||
build:
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' javascript_wrapper_cpp
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' JSENGINE='$(JSENGINE)' javascript_build_cpp
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(EXAMPLES_TOP)/Makefile javascript_clean
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS =
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS =
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS =
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
SRCS = example.cxx
|
||||
|
||||
include ../js_example.mk
|
||||
include ../example.mk
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue