Makefile modified to only compile the extension that we need.
[sympyx.git] / Makefile
blob959efe5d28e6ffb2461a723bdb23c9148aef48ea
3 PYTHON := python
4 CYTHON := cython --convert-range
5 CC := gcc
6 CFLAGS := \
7 $(shell $(PYTHON)-config --includes) #\
8 #$(shell pkg-config glib-2.0 --cflags)
10 #LIBS := -lglib-2.0
12 CFLAGS += -g -O0 -fPIC # -O3
15 all : sympy_pyx.so
20 # rules
21 %.c : %.pyx
22 $(CYTHON) $<
24 %.o : %.c
25 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
28 %.so : %.o
29 $(CC) $(LDFLAGS) -shared $+ -o $@ $(LIBS)
31 # keep those *.o and *.so files
32 .SECONDARY:
34 clean:
35 rm -f *.so *.pyd *.o csympy.c csympy_api.h
36 rm -f *.pyc