Sat, 19 Jan 2002 19:14:36 +0100
trunk: changeset 38
Warning callbacks (thanks to Lukas Schroeder). libtu now depends on
the asprintf functions and one implementation is included in
snprintf_2.2/.
3 | 1 | ## |
2 | ## libtu Makefile | |
3 | ## | |
0 | 4 | |
3 | 5 | # System-specific configuration is in system.mk |
6 | include system.mk | |
0 | 7 | |
8 | ###################################### | |
9 | ||
5 | 10 | INCLUDES += -I./include |
16 | 11 | CFLAGS += $(POSIX_SOURCE) |
5 | 12 | |
34 | 13 | OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o map.o |
0 | 14 | |
27 | 15 | ifdef LIBTU_NO_ERRMSG |
28 | 16 | DEFINES += -DLIBTU_NO_ERRMSG |
27 | 17 | else |
25 | 18 | ifndef HAS_SYSTEM_ASPRINTF |
35 | 19 | OBJS += snprintf_2.2/snprintf.o |
25 | 20 | else |
28 | 21 | DEFINES += -DHAS_SYSTEM_ASPRINTF |
25 | 22 | endif |
27 | 23 | endif |
25 | 24 | |
0 | 25 | TARGETS=libtu.a |
26 | TESTERS=tester tester2 tester3 | |
27 | ||
28 | ###################################### | |
29 | ||
3 | 30 | include rules.mk |
31 | ||
32 | ###################################### | |
0 | 33 | |
34 | testers: $(TESTERS) | |
35 | ||
36 | libtu.a: $(OBJS) | |
9 | 37 | $(AR) $(ARFLAGS) $@ $+ |
29 | 38 | $(RANLIB) $@ |
39 | ||
8 | 40 | tester: tester.c libtu.a |
9 | 41 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 42 | |
43 | tester2: tester2.c libtu.a | |
9 | 44 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 45 | |
46 | tester3: tester3.c libtu.a | |
9 | 47 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 48 | |
3 | 49 | _install: |
23 | 50 | $(INSTALLDIR) $(LIBDIR) |
30 | 51 | $(INSTALLDIR) $(INCDIR)/libtu |
3 | 52 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
8 | 53 | for i in include/libtu/*.h; do \ |
30 | 54 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ |
8 | 55 | done |