Make C example makefiles more standard. Note that valgrind can be used

via the RUNTOOL env variable, see the docs on running the test-suite.

From: William S Fulton <wsf@fultondesigns.co.uk>

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@13041 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-05-07 17:02:51 +00:00
commit dcc3756341
4 changed files with 4 additions and 36 deletions

View file

@ -1,11 +1,10 @@
TOP = ../..
SWIG = $(TOP)/../preinst-swig -debug-module 4 > tree.txt
SWIG = $(TOP)/../preinst-swig
CXXSRCS = example.cxx
TARGET = example
INTERFACE = example.i
RUNME = runme.c
PROXY = example_proxy.c
MEMTOOL = valgrind --leak-check=full
all::
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
@ -16,13 +15,6 @@ all::
run:
env LD_LIBRARY_PATH=. ./runme
memchk:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXXFLAGS='-g' c_cpp
$(MAKE) -f $(TOP)/Makefile RUNME='$(RUNME)' PROXY='$(PROXY)' \
TARGET='$(TARGET)' CFLAGS='-g' c_compile
env LD_LIBRARY_PATH=. $(MEMTOOL) ./runme
clean:
rm -f *.o *.out *.so *.a *.dll *.dylib *.exe *_wrap* *_proxy* *~ runme