blob: 22e78c9fd904880252a68dbfb3d726c6dc18543c (
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
|
CC=gcc
CFLAGS+=-g -Wall -Werror --std=c99 -fPIC
PYTHON=/usr/include/python2.4
all : _ttest.so
%.o: %.c %.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean :
rm -f *.o _ttest.so
ttest_wrap.c: ttest.i
swig -python ttest.i
ttest_wrap.o: ttest_wrap.c
gcc -fPIC -I$(PYTHON) -o $@ -c $<
_ttest.so : ttest_wrap.o ttest.o
gcc -shared -o $@ $^
|