equal
deleted
inserted
replaced
2 |
2 |
3 # warnings, and use C99 with GNU extensions |
3 # warnings, and use C99 with GNU extensions |
4 CFLAGS = -Wall -std=gnu99 -g |
4 CFLAGS = -Wall -std=gnu99 -g |
5 |
5 |
6 # preprocessor flags |
6 # preprocessor flags |
7 CPPFLAGS = -Isrc/ |
7 CPPFLAGS = -Iinclude -Isrc/ |
8 |
8 |
9 # libraries to use |
9 # libraries to use |
10 LOADLIBES = -lpng |
10 LOADLIBES = -lpng |
11 |
11 |
12 # output name |
12 # output name |
15 |
15 |
16 all: depend lib/libpngtile.so bin/util |
16 all: depend lib/libpngtile.so bin/util |
17 |
17 |
18 lib/libpngtile.so : \ |
18 lib/libpngtile.so : \ |
19 build/obj/lib/image.o build/obj/lib/cache.o \ |
19 build/obj/lib/image.o build/obj/lib/cache.o \ |
20 build/obj/shared/util.o |
20 build/obj/shared/util.o build/obj/shared/log.o |
|
21 |
|
22 lib/pypngtile.so : \ |
|
23 lib/libpngtile.so |
21 |
24 |
22 bin/util: \ |
25 bin/util: \ |
23 lib/libpngtile.so \ |
26 lib/libpngtile.so \ |
24 build/obj/shared/log.o |
27 build/obj/shared/log.o |
25 |
28 |
68 |
71 |
69 # output libraries |
72 # output libraries |
70 lib/lib%.so : |
73 lib/lib%.so : |
71 $(CC) -shared $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
74 $(CC) -shared $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
72 |
75 |
|
76 build/pyx/%.c : src/py/%.pyx |
|
77 cython -o $@ $< |
|
78 |
|
79 build/obj/py/%.o : build/pyx/%.c |
|
80 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ |
|
81 |
|
82 lib/py%.so : build/obj/py/%.o |
|
83 $(CC) -shared $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
|
84 |
73 dist: |
85 dist: |
74 mkdir -p dist/$(DIST_NAME) |
86 mkdir -p dist/$(DIST_NAME) |
75 cp -rv Makefile $(DIST_RESOURCES) src/ dist/$(DIST_NAME)/ |
87 cp -rv Makefile $(DIST_RESOURCES) src/ dist/$(DIST_NAME)/ |
76 rm dist/$(DIST_NAME)/src/*/.*.sw[op] |
88 rm dist/$(DIST_NAME)/src/*/.*.sw[op] |
77 make -C dist/$(DIST_NAME) dirs |
89 make -C dist/$(DIST_NAME) dirs |