equal
deleted
inserted
replaced
51 .PHONY : dirs clean depend dist |
51 .PHONY : dirs clean depend dist |
52 |
52 |
53 dirs: |
53 dirs: |
54 mkdir -p bin lib dist |
54 mkdir -p bin lib dist |
55 mkdir -p $(SRC_DIRS:%=build/deps/%) |
55 mkdir -p $(SRC_DIRS:%=build/deps/%) |
56 mkdir -p $(SRC_DIRS:%=build/obj/%) build/obj/py |
56 mkdir -p $(SRC_DIRS:%=build/obj/%) build/obj/python |
57 |
57 |
58 clean: |
58 clean: |
59 rm -f build/obj/*/*.o build/deps/*/*.d build/pyx/*.c |
59 rm -f build/obj/*/*.o build/deps/*/*.d build/pyx/*.c |
60 rm -f bin/{pngtile,pngtile-static} lib/libpngtile.{a,so} run/* |
60 rm -f bin/{pngtile,pngtile-static} lib/libpngtile.{a,so} run/* |
61 rm -rf dist/* |
61 rm -rf dist/* |
96 $(AR) rc $@ $+ |
96 $(AR) rc $@ $+ |
97 |
97 |
98 python/%.c : python/%.pyx |
98 python/%.c : python/%.pyx |
99 cython -o $@ $< |
99 cython -o $@ $< |
100 |
100 |
101 build/obj/py/%.o : python/%.c |
101 build/obj/python/%.o : python/%.c |
102 $(CC) -c -fPIC -I/usr/include/python2.5 $(CPPFLAGS) $(CFLAGS) $< -o $@ |
102 $(CC) -c -fPIC -I/usr/include/python2.5 $(CPPFLAGS) $(CFLAGS) $< -o $@ |
103 |
103 |
104 lib/py%.so : build/obj/py/py%.o |
104 lib/py%.so : build/obj/python/py%.o |
105 $(CC) -shared $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
105 $(CC) -shared $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
106 |
106 |
107 dist: |
107 dist: |
108 mkdir -p dist/$(DIST_NAME) |
108 mkdir -p dist/$(DIST_NAME) |
109 cp -rv Makefile $(DIST_RESOURCES) src/ include/ dist/$(DIST_NAME)/ |
109 cp -rv Makefile $(DIST_RESOURCES) src/ include/ dist/$(DIST_NAME)/ |