swig/Examples/python/Makefile
Stefan Zager 460ac6206a A place to write and run performance tests. The variants we're
most interested in are:

'baseline' -- swig run without any special flags
'optimized' -- swig run with -O flag
'builtin' -- swig run with -builtin flag




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12442 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-09 07:26:07 +00:00

40 lines
1 KiB
Makefile

ifeq (,$(PY3))
PYTHON_INCLUDE= $(DEFS) -I/usr/include/python2.6 -I/usr/lib/python2.6/config
PYTHON_LIB =
PYTHON = python
PYSCRIPT = runme.py
else
PYTHON_INCLUDE= $(DEFS) -I/home/szager/include/python3.1
PYTHON_LIB =
PYTHON = python3
PYSCRIPT = runme3.py
endif
SUBDIRS := constructor func deep_hierarchy
default : all
.PHONY : $(SUBDIRS) all clean
all : $(SUBDIRS)
@for subdir in $(SUBDIRS); do \
echo Running $$subdir test... ; \
echo -------------------------------------------------------------------------------- ; \
cd $$subdir; \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=$(srcdir):$$PYTHONPATH $(PYTHON) $(PYSCRIPT); \
cd ..; \
done
$(SUBDIRS) :
$(MAKE) -C $@
@echo Running $$subdir test...
@echo --------------------------------------------------------------------------------
cd $@ && env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=$(srcdir):$$PYTHONPATH $(PYTHON) $(PYSCRIPT)
%-clean :
$(MAKE) -s -C $* clean
$(SUBDIRS:%=%-check) :
$(MAKE) -C $* check
clean : $(SUBDIRS:%=%-clean)