blob: 6e0602e6d48a93d3f1520c080a1ae9586612d924 (
plain)
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
|
$NetBSD: patch-extras_swig_makefile,v 1.3 2019/12/18 01:34:34 schmonz Exp $
Use pkgsrc-specified compiler and flags.
--- extras/swig/makefile.orig 2019-11-11 16:57:10.000000000 +0000
+++ extras/swig/makefile
@@ -1,6 +1,6 @@
-CXX=g++
-CFLAGS=-g -O2 -fPIC
+#CXX=g++
+#CFLAGS=-g -O2 -fPIC
HL_INC=../../src/include/
HL_SRC=../../src/
@@ -12,24 +12,24 @@ PERL_INC=$(shell perl -MExtUtils::Embed
PHP_INC=$(shell php-config --includes)
lib-stamp:
- make -C ../.. -f ./makefile clean-obj
- PIC=1 make -C ../.. -f ./makefile CFLAGS="${CFLAGS}" lib-static
+ #make -C ../.. -f ./makefile clean-obj
+ #PIC=1 make -C ../.. -f ./makefile CFLAGS="${CFLAGS}" lib-static
touch $@
python: lib-stamp
- swig -c++ -python -o highlight_wrap.cpp highlight.i
- ${CXX} ${CFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PYTHON_CFLAGS} -I${HL_INC}
- ${CXX} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -lpython2.7 -o _highlight.so
+ swig3.0 -c++ -python -o highlight_wrap.cpp highlight.i
+ ${CXX} ${CFLAGS} ${LDFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PYTHON_CFLAGS} -I${HL_INC}
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -lpython2.7 -o _highlight.so
perl: lib-stamp
- swig -c++ -perl -o highlight_wrap.cpp highlight.i
- ${CXX} ${CFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PERL_INC} -I${HL_INC}
- ${CXX} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -o highlight.so
+ swig3.0 -c++ -perl -o highlight_wrap.cpp highlight.i
+ ${CXX} ${CFLAGS} ${LDFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PERL_INC} -I${HL_INC}
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -lperl -o highlight.so
php: lib-stamp
- swig -c++ -php -o highlight_wrap.cpp highlight.i
- ${CXX} ${CFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PHP_INC} -I${HL_INC}
- ${CXX} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -o highlight.so
+ swig3.0 -c++ -php -o highlight_wrap.cpp highlight.i
+ ${CXX} ${CFLAGS} ${LDFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PHP_INC} -I${HL_INC}
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -s highlight_wrap.o -L${HL_SRC} -lhighlight ${LUA_LIBS} -lphp -o highlight.so
clean: python-clean perl-clean php-clean
rm -f *-stamp
|