swig/Examples/c/std_vector/Makefile
Vadim Zeitlin 19ed0b531d Fix and simplify C examples makefiles
Make "make check-c-examples" perform the correct build commands, e.g. not link
the proxy code into the shared library as this can't work because it defines
the same functions that are already present in it.

Also fix the c_xxx targets to work when SWIG is built in a separate build
directory.

Finally, simplify them by removing the unnecessary variables.

Notice that std_vector example still doesn't build, but at least now it is due
to a real problem in the C module and not makefile bugs.
2016-04-10 22:45:51 +02:00

18 lines
556 B
Makefile

TOP = ../..
SWIGEXE = $(TOP)/../swig
SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
CXXSRCS = example.cxx
TARGET = example
INTERFACE = example.i
check: build
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' c_run
build:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' c_cpp
clean:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' c_clean