source: branches/stable/BINDINGS/Makefile

Last change on this file was 10998, checked in by westram, 11 years ago
  • cflags were completely unused (untested)
File size: 1.5 KB
Line 
1# Variables we get from main makefile:
2# DFLAGS: -D statements => add to preprocessor flags
3CPPFLAGS += $(DFLAGS)
4# CXX_INCLUDES:  -I statemenmts => add to g++ flags
5CXXFLAGS += $(CXX_INCLUDES)
6# ARBDB_LIB: -l statements => add to LIBS
7LIBS += $(ARBDB_LIB)
8# LIBPATH: -L statements => add to LDLIBS
9LDLIBS += $(LIBPATH)
10CXX=$(A_CXX) $(cflags) $(cxxflags)
11CXXFLAGS += -fpic
12CFLAGS += -fpic
13
14
15#LANGUAGES = PERL PYTHON R
16LANGUAGES = PYTHON
17
18PYTHONINSTALLPATH=$(ARBHOME)/lib/python2.6
19PERLINSTALLPATH=$(ARBHOME)/lib/perl5
20
21INCLUDES = -I$(ARBHOME)/BINDINGS
22CXXFLAGS += $(INCLUDES)
23CFLAGS += $(INCLUDES)
24
25export CPPFLAGS CXXFLAGS CFLAGS LIBS LDLIBS CXX 
26
27ifeq ($(UNIT_TESTS),1)
28TARGETS = $(LANGUAGES:%=%-test)
29else
30TARGETS = $(LANGUAGES:%=%-build)
31endif
32
33all: $(TARGETS)
34
35clean: $(LANGUAGES:%=%-clean)
36        -rm -f ARB_oolayer.o
37
38ARB_oolayer.o: ARB_oolayer.h ARB_oolayer.cpp
39
40PYTHON-build: ARB.i PYTHON/ARB.i
41        cd PYTHON; ./setup.py build
42        cd PYTHON; ./setup.py install --install-lib $(PYTHONINSTALLPATH) 
43
44PYTHON-test: PYTHON-build
45        cd PYTHON; ./test.py
46
47PYTHON-clean:
48        cd PYTHON; ./setup.py clean
49        -rm -rf PYTHON/build
50        -rm -rf $(PYTHONINSTALLPATH)
51        -rm -f PYTHON/ARB.py PYTHON/ARB_wrap.cpp
52
53PYTHON-test:
54
55
56
57PERL-build: PERL/Makefile PERL/ARB_wrap.cpp
58        $(MAKE) -C PERL install
59
60PERL-clean: PERL/Makefile
61        $(MAKE) -C PERL clean
62        -rm -f PERL/Makefile.old PERL/ARB_wrap.cxx
63        -rm -rf $(PERLINSTALLPATH)
64
65PERL/Makefile: PERL/Makefile.PL
66        cd PERL; perl Makefile.PL
67
68PERL/ARB_wrap.cxx: ARB.i PERL/ARB.i
69        cd PERL; swig -c++ -perl ARB.i
70
71
Note: See TracBrowser for help on using the repository browser.