File: Makefile

package info (click to toggle)
librcsb-core-wrapper 1.005-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,420 kB
  • ctags: 3,504
  • sloc: xml: 122,915; cpp: 25,250; ansic: 3,737; makefile: 1,033; sh: 784; lex: 294; yacc: 235; perl: 213; python: 121; csh: 30
file content (154 lines) | stat: -rw-r--r-- 5,161 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Top level Makefile

UTIL_LOC = https://svn-dev.wwpdb.org/svn-rcsb/build/util
UTIL_MODULE = util
CHECKOUT_SCRIPT = checkout.sh
DIFF_SCRIPT = diff.sh
COMPILE_SCRIPT = compile.sh
CLEAN_SCRIPT = clean.sh
TEST_SCRIPT = test.sh
CLEAN_TEST_SCRIPT = clean_test.sh
DOC_SCRIPT = doc.sh
CLEAN_DOC_SCRIPT = clean_doc.sh
EXPORT_SCRIPT = export.sh

all: wrapper

.PHONY: wrapper
wrapper: lib/librcsb-core-wrapper.la
	cd wrapper && $(MAKE) OPT=-O

compile:  
	@echo
	@echo ------- compile targets are compile_lnx_38, compile_lnx_41, compile_wwpdb_py27 and compile_osx -------

install: 
	@echo 
	@echo -------- Updating shared wrapper library --------
	@rm -f ./test/CorePyWrap.so
	@cp ./wrapper/lib/CorePyWrap.so ./test


build: checkout

clean: clean_build clean_test clean_doc

checkout:
	@echo 
	@echo -------- Getting version Latest of module util --------
	@svn co $(UTIL_LOC)/trunk $(UTIL_MODULE) 
	@sh -c 'cd ./$(UTIL_MODULE); ./$(CHECKOUT_SCRIPT)'

diff:
	@sh -c 'cd ./$(UTIL_MODULE); ./$(DIFF_SCRIPT)'

compile_osx:
	@sh -c 'cd ./$(UTIL_MODULE); \
         export PIC=-fPIC;  \
         export WWPDB_XERCESC_INC=/opt/local/include; \
         export WWPDB_XERCESC_LIB_DIR=/opt/local/lib; \
         export WWPDB_XERCESC_LIB=xerces-c-3.1; \
         export WWPDB_PYTHON_INC=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7; \
         export WWPDB_BOOST_INC=/opt/local/include; \
         export WWPDB_BOOST_PYTHON_LIB_DIR=/opt/local/lib; \
         export WWPDB_BOOST_PYTHON_LIB=boost_python-mt; \
         export WWPDB_PYTHON_LIB_DIR=/opt/local/lib; \
         export WWPDB_PYTHON_LIB=python2.7; \
        ./$(COMPILE_SCRIPT)'

compile_lnx_38:
	@sh -c 'cd ./$(UTIL_MODULE); \
         export PIC=-fPIC;  \
         export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
         export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
         export WWPDB_PYTHON_LIB=python2.5; \
         export WWPDB_BOOST_INC=/apps/boost_1_38_0/include/boost-1_38; \
         export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost_1_38_0/lib; \
         export WWPDB_BOOST_PYTHON_LIB=boost_python-gcc41-mt-1_38; \
         export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
         export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
         export WWPDB_XERCESC_LIB=xerces-c; \
         ./$(COMPILE_SCRIPT)'

compile_lnx_41:
	@sh -c 'cd ./$(UTIL_MODULE); \
        export PIC=-fPIC; \
        export WWPDB_PYTHON_INC=/apps/python/include/python2.5; \
	export WWPDB_PYTHON_LIB_DIR=/apps/python/lib; \
        export WWPDB_PYTHON_LIB=python2.5; \
        export WWPDB_BOOST_INC=/apps/boost/include/boost-1_41; \
        export WWPDB_BOOST_PYTHON_LIB_DIR=/apps/boost/lib; \
        export WWPDB_BOOST_PYTHON_LIB=boost_python-gcc41-mt-1_41; \
        export WWPDB_XERCESC_INC=/apps/xerces-3.0.1/include; \
        export WWPDB_XERCESC_LIB_DIR=/apps/xerces-3.0.1/lib; \
        export WWPDB_XERCESC_LIB=xerces-c; \
        ./$(COMPILE_SCRIPT)'


compile_wwpdb_py27:
	@sh -c 'cd ./$(UTIL_MODULE); \
        export PIC=-fPIC; \
        export WWPDB_PYTHON_INC=$(TOP_INSTALL_DIR)/include/python2.7; \
	export WWPDB_PYTHON_LIB_DIR=$(TOP_INSTALL_DIR)/lib; \
        export WWPDB_PYTHON_LIB=python2.7; \
        export WWPDB_BOOST_INC=$(TOP_INSTALL_DIR)/include; \
        export WWPDB_BOOST_PYTHON_LIB_DIR=$(TOP_INSTALL_DIR)/lib; \
        export WWPDB_BOOST_PYTHON_LIB=boost_python-mt; \
        export WWPDB_XERCESC_INC=$(TOP_INSTALL_DIR)/include; \
        export WWPDB_XERCESC_LIB_DIR=$(TOP_INSTALL_DIR)/lib; \
        export WWPDB_XERCESC_LIB=xerces-c; \
        ./$(COMPILE_SCRIPT)'



# lkajan: the reason for this is that I do not want to set prerequisites here just now, so I make it made always
.PHONY: lib/librcsb-core-wrapper.la
lib/librcsb-core-wrapper.la:
	+sh -c '\
	 export PIC=-fPIC; \
	 export WWPDB_XERCESC_INC=/usr/include; \
	 export WWPDB_XERCESC_LIB_DIR=/usr/lib; \
	 export WWPDB_XERCESC_LIB=xerces-c; \
	( cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) ); \
	libtool --mode=link $(CXX) -version-info 0:1:0 -rpath /usr/lib $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -l$${WWPDB_XERCESC_LIB} -o lib/librcsb-core-wrapper.la lib/*.lo'

debug:
	@sh -c 'cd ./$(UTIL_MODULE); ./$(COMPILE_SCRIPT) debug'

clean_build: 
	@sh -c 'cd ./$(UTIL_MODULE); ./$(CLEAN_SCRIPT)'
	@rm -rf lib/* lib/.??*

test: test-all

test-all: compile 
	@sh -c 'cd ./$(UTIL_MODULE); ./$(TEST_SCRIPT)'

clean_test: 
	@sh -c 'cd ./$(UTIL_MODULE); ./$(CLEAN_TEST_SCRIPT)'

###
doc:
	rm -rf rcsb && cp -r include rcsb
	grep -lr '^#include "' rcsb | xargs sed -i -e '/^#include "/{ s/#include "\([^"]\+\)"/#include <rcsb\/\1>/; }'
	mkdir -p docs/doxyfiles
	echo PROJECT_NAME = librcsb-core-wrapper > docs/doxyfiles/Doxyfile
	echo PROJECT_NUMBER = $(shell dpkg-parsechangelog | grep '^Version' | sed -e 's/Version: \(.*\)-[^-]\+$$/\1/g;') >> docs/doxyfiles/Doxyfile
	echo OUTPUT_DIRECTORY = docs >> docs/doxyfiles/Doxyfile
	echo INPUT = rcsb >> docs/doxyfiles/Doxyfile
	cat etc/Doxyfile-template >> docs/doxyfiles/Doxyfile
	doxygen docs/doxyfiles/Doxyfile

clean_doc:
	rm -rf docs
	rm -rf rcsb

export: clean
	@sh -c 'cd ./$(UTIL_MODULE); ./$(EXPORT_SCRIPT)'

###

everything:  compile