File: makefile

package info (click to toggle)
highlight 2.16-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,964 kB
  • ctags: 2,733
  • sloc: cpp: 21,915; php: 604; makefile: 280; perl: 105; python: 92
file content (34 lines) | stat: -rw-r--r-- 855 bytes parent folder | download
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

CXX=g++
CFLAGS=-g -O2 -fPIC

HL_SRC=../../src/

PYTHON_INC=/usr/include/python2.5/

PERL_INC=`perl -MExtUtils::Embed -eperl_inc`

lib-stamp: 
	make -C ${HL_SRC} -f ./makefile clean
	make -C ${HL_SRC} -f ./makefile CFLAGS="${CFLAGS}" libhighlight.a
	touch $@

python: lib-stamp
	swig -c++ -python -o highlight_wrap.cpp  highlight.i
	${CXX} ${CFLAGS} -c highlight_wrap.cpp  -I${PYTHON_INC} -I${HL_SRC}
	${CXX} -shared -s highlight_wrap.o  -L${HL_SRC} -lhighlight -o _highlight.so

perl: lib-stamp
	swig -c++ -perl -o highlight_wrap.cpp  highlight.i
	${CXX} ${CFLAGS} -c highlight_wrap.cpp ${PERL_INC} -I${HL_SRC}
	${CXX} -shared -s highlight_wrap.o  -L${HL_SRC} -lhighlight -o highlight.so


clean: python-clean perl-clean
	rm *-stamp

perl-clean:
	rm -f highlight.so highlight_wrap.cpp highlight.pm *.o


.PHONY: python python-clean perl perl-clean clean