equal
deleted
inserted
replaced
5 |
5 |
6 # preprocessor flags |
6 # preprocessor flags |
7 CPPFLAGS = -Iinclude -Isrc/ |
7 CPPFLAGS = -Iinclude -Isrc/ |
8 |
8 |
9 # libraries to use |
9 # libraries to use |
10 LOADLIBES = -lpng |
10 LOADLIBES = -lpng -lpthread |
11 |
11 |
12 # output name |
12 # output name |
13 DIST_NAME = 78949E-as2 |
13 DIST_NAME = 78949E-as2 |
14 DIST_RESOURCES = README "Learning Diary.pdf" |
14 DIST_RESOURCES = README "Learning Diary.pdf" |
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 build/obj/lib/tile.o build/obj/lib/error.o \ |
19 build/obj/lib/ctx.o build/obj/lib/image.o build/obj/lib/cache.o build/obj/lib/tile.o build/obj/lib/error.o \ |
20 build/obj/shared/util.o build/obj/shared/log.o |
20 build/obj/shared/util.o build/obj/shared/log.o |
21 |
21 |
22 lib/pypngtile.so : \ |
22 lib/pypngtile.so : \ |
23 lib/libpngtile.so |
23 lib/libpngtile.so |
24 |
24 |
56 # build (potential) library targets with specific cflags |
56 # build (potential) library targets with specific cflags |
57 # XXX: just build everything with -fPIC? |
57 # XXX: just build everything with -fPIC? |
58 build/obj/shared/%.o : src/shared/%.c |
58 build/obj/shared/%.o : src/shared/%.c |
59 $(CC) -c -fPIC $(CPPFLAGS) $(CFLAGS) $< -o $@ |
59 $(CC) -c -fPIC $(CPPFLAGS) $(CFLAGS) $< -o $@ |
60 |
60 |
|
61 # XXX: hax in -pthread |
61 build/obj/lib/%.o : src/lib/%.c |
62 build/obj/lib/%.o : src/lib/%.c |
62 $(CC) -c -fPIC $(CPPFLAGS) $(CFLAGS) $< -o $@ |
63 $(CC) -c -fPIC -pthread $(CPPFLAGS) $(CFLAGS) $< -o $@ |
63 |
64 |
64 # general binary objects |
65 # general binary objects |
65 build/obj/%.o : src/%.c |
66 build/obj/%.o : src/%.c |
66 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ |
67 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ |
67 |
68 |