1 # Makefile for cgreylag module
6 # SWIG is still experiencing rapid development--1.3.28 or better is required.
7 # A reasonably recent g++/libstdc++ may also be required. Python 2.4 or
10 # Developed with swig 1.3.28, g++ 4.1.2, libstdc++.so.6 (ld 2.16.91)
13 .PHONY
: all pycheck modsyms
install clean tags
24 DEST
= /n
/site
/inst
/Linux-i686
/bioinfo
/greylag
/
28 # Generally, this is where the 'Python.h' corresponding to your 'python' lives.
29 #PYTHON_I = /n/site/inst/Linux-i686/sys/include/python$(PYTHONVER)
30 PYTHON_I
= /usr
/include/python
$(PYTHONVER
)
32 CXXBASEFLAGS
=-Wall
-g3
-march
=$(MARCH
)
34 # This makes it easy to compile different versions without editing this file.
35 # 0=debug, 2=fast, 3=faster and less safe
39 # for debugging (extra checking, slow)
40 CXXFLAGS
= $(CXXBASEFLAGS
) -O0
-D_GLIBCXX_DEBUG
44 CXXFLAGS
= $(CXXBASEFLAGS
) -O2
-ffast-math
-mfpmath
=sse
47 # for speed (fastest?, fewest checks)
48 CXXFLAGS
= $(CXXBASEFLAGS
) -O3
-DNDEBUG
-ffast-math
-mfpmath
=sse
49 #CXXFASTFLAGS = -finline-limit=20000 --param inline-unit-growth=1000 --param large-function-growth=1000
51 CXXFLAGS
= ---INVALID-SPEED
56 SWIGCXXFLAGS
= $(CXXFLAGS
) -fPIC
-I
$(PYTHON_I
) -fno-strict-aliasing \
57 -Wno-unused-function
-Wno-uninitialized
64 $(MODULE
)_wrap.
cpp : $(MODULE
).i
$(MODULE
).hpp
65 swig
-c
++ -python
-o
$@
$<
67 $(MODULE
)_wrap.o
: $(MODULE
)_wrap.
cpp $(MODULE
).hpp
68 g
++ $(SWIGCXXFLAGS
) -c
$<
70 $(MODULE
).o
: $(MODULE
).
cpp $(MODULE
).hpp
71 g
++ $(CXXFLAGS
) $(CXXFASTFLAGS
) -c
$<
73 _
$(MODULE
).so
: $(MODULE
).o
$(MODULE
)_wrap.o
74 g
++ $(CXXFLAGS
) $(CXXFASTFLAGS
) -shared
$^
-o
$@
78 PYTHONVER
=$(PYTHONVER
) pychecker
--limit
1000 $(PROGRAM
).py
80 # summary C++ modules symbols used by main script
82 @sed
-n
-e
's/^.*\(cgreylag\.[a-zA-Z0-9_.]*\).*$$/\1/p' $(PROGRAM
).py \
86 TAGS
: $(MODULE
).
cpp $(MODULE
).hpp
89 # FIX: we could compile the .py files here
91 [ -d
$(DEST
) ] ||
install -d
$(DEST
)
92 install -p _
$(MODULE
).so
$(DEST
)
93 install -p
--mode
=444 $(MODULE
).py
$(DEST
)
94 install -p
$(PROGRAM
).py
$(DEST
)
97 -rm -f
$(MODULE
).py
$(MODULE
)_wrap.
cpp $(MODULE
).o
$(MODULE
)_wrap.o \
98 _
$(MODULE
).so
*.py
[co] TAGS