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
|
# -*- sh -*-
.PHONY: all build install demo clean
DEFS=@DEFS@
LIBS=@LIBS@
LDSHARED=@LD_SHARED@
# either ../libg2.so or ../libg2.a must be there
# to make libg2.so the default, uncomment the next line and the three lines below DEPENDENCY=
#ifeq ("$(LDSHARED)","")
DEPENDENCY= libg2.a
#else
#DEPENDENCY= libg2.so
#endif
all: build
build: ../$(DEPENDENCY)
python setup.py "$(DEFS)" "$(LIBS)" build_ext
../$(DEPENDENCY):
cd ..; make $(DEPENDENCY)
# must be root
install: build
python setup.py "$(DEFS)" "$(LIBS)" install
demo:
ln -f -s $(shell find build -name g2.so) .
python g2_test.py
clean:
-rm -fr build
-rm -f g2.so g2.map g2_test{_clip.eps,.{eps,ps,png,jpg,fig}} penguin.pyc
|