1 | # Variables we get from main makefile: |
---|
2 | # DFLAGS: -D statements => add to preprocessor flags |
---|
3 | CPPFLAGS += $(DFLAGS) |
---|
4 | # CXX_INCLUDES: -I statemenmts => add to g++ flags |
---|
5 | CXXFLAGS += $(CXX_INCLUDES) |
---|
6 | # ARBDB_LIB: -l statements => add to LIBS |
---|
7 | LIBS += $(ARBDB_LIB) |
---|
8 | # LIBPATH: -L statements => add to LDLIBS |
---|
9 | LDLIBS += $(LIBPATH) |
---|
10 | CXX=$(A_CXX) $(cflags) $(cxxflags) |
---|
11 | CXXFLAGS += -fpic |
---|
12 | CFLAGS += -fpic |
---|
13 | |
---|
14 | |
---|
15 | #LANGUAGES = PERL PYTHON R |
---|
16 | LANGUAGES = PYTHON |
---|
17 | |
---|
18 | PYTHONINSTALLPATH=$(ARBHOME)/lib/python2.6 |
---|
19 | PERLINSTALLPATH=$(ARBHOME)/lib/perl5 |
---|
20 | |
---|
21 | INCLUDES = -I$(ARBHOME)/BINDINGS |
---|
22 | CXXFLAGS += $(INCLUDES) |
---|
23 | CFLAGS += $(INCLUDES) |
---|
24 | |
---|
25 | export CPPFLAGS CXXFLAGS CFLAGS LIBS LDLIBS CXX |
---|
26 | |
---|
27 | ifeq ($(UNIT_TESTS),1) |
---|
28 | TARGETS = $(LANGUAGES:%=%-test) |
---|
29 | else |
---|
30 | TARGETS = $(LANGUAGES:%=%-build) |
---|
31 | endif |
---|
32 | |
---|
33 | all: $(TARGETS) |
---|
34 | |
---|
35 | clean: $(LANGUAGES:%=%-clean) |
---|
36 | -rm -f ARB_oolayer.o |
---|
37 | |
---|
38 | ARB_oolayer.o: ARB_oolayer.h ARB_oolayer.cpp |
---|
39 | |
---|
40 | PYTHON-build: ARB.i PYTHON/ARB.i |
---|
41 | cd PYTHON; ./setup.py build |
---|
42 | cd PYTHON; ./setup.py install --install-lib $(PYTHONINSTALLPATH) |
---|
43 | |
---|
44 | PYTHON-test: PYTHON-build |
---|
45 | cd PYTHON; ./test.py |
---|
46 | |
---|
47 | PYTHON-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 | |
---|
53 | PYTHON-test: |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | PERL-build: PERL/Makefile PERL/ARB_wrap.cpp |
---|
58 | $(MAKE) -C PERL install |
---|
59 | |
---|
60 | PERL-clean: PERL/Makefile |
---|
61 | $(MAKE) -C PERL clean |
---|
62 | -rm -f PERL/Makefile.old PERL/ARB_wrap.cxx |
---|
63 | -rm -rf $(PERLINSTALLPATH) |
---|
64 | |
---|
65 | PERL/Makefile: PERL/Makefile.PL |
---|
66 | cd PERL; perl Makefile.PL |
---|
67 | |
---|
68 | PERL/ARB_wrap.cxx: ARB.i PERL/ARB.i |
---|
69 | cd PERL; swig -c++ -perl ARB.i |
---|
70 | |
---|
71 | |
---|