D: Fix out-of-source build for examples.
This commit is contained in:
parent
7c57ebf888
commit
86276568df
12 changed files with 61 additions and 240 deletions
|
|
@ -1,27 +1 @@
|
|||
ifeq (2,$(D_VERSION))
|
||||
WORKING_DIR = d2/
|
||||
else
|
||||
WORKING_DIR = d1/
|
||||
endif
|
||||
|
||||
TOP = ../../..
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
EXTRA_CFLAGS = -I../ ../example.cxx example_wrap.cxx
|
||||
EXTRA_LDFLAGS = example.o example_wrap.o
|
||||
TARGET = example_wrap
|
||||
SWIGOPT =
|
||||
DSRCS = *.d
|
||||
DFLAGS = -ofrunme
|
||||
|
||||
check: build
|
||||
cd $(WORKING_DIR); \
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
|
||||
|
||||
build:
|
||||
cd $(WORKING_DIR); \
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
|
||||
|
||||
clean:
|
||||
cd $(WORKING_DIR); \
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
|
||||
include ../example.mk
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue