Mon, 16 Feb 2004 00:55:23 +0100
trunk: changeset 1306
Fixed snprintf path.
3 | 1 | ## |
2 | ## libtu Makefile | |
3 | ## | |
0 | 4 | |
3 | 5 | # System-specific configuration is in system.mk |
50 | 6 | TOPDIR=. |
44 | 7 | include system-inc.mk |
0 | 8 | |
9 | ###################################### | |
10 | ||
5 | 11 | INCLUDES += -I./include |
57 | 12 | CFLAGS += $(C89_SOURCE) $(POSIX_SOURCE) |
5 | 13 | |
48 | 14 | SOURCES=misc.c output.c util.c optparser.c parser.c tokenizer.c map.c |
0 | 15 | |
27 | 16 | ifdef LIBTU_NO_ERRMSG |
28 | 17 | DEFINES += -DLIBTU_NO_ERRMSG |
27 | 18 | else |
25 | 19 | ifndef HAS_SYSTEM_ASPRINTF |
48 | 20 | SOURCES += snprintf_2.2/snprintf.c |
25 | 21 | else |
28 | 22 | DEFINES += -DHAS_SYSTEM_ASPRINTF |
25 | 23 | endif |
27 | 24 | endif |
25 | 25 | |
0 | 26 | TARGETS=libtu.a |
27 | TESTERS=tester tester2 tester3 | |
58 | 28 | HEADERS=dlist.h misc.h output.h tokenizer.h util.h \ |
29 | map.h np-conv.h optparser.h parser.h types.h | |
0 | 30 | |
31 | ###################################### | |
32 | ||
48 | 33 | include $(TOPDIR)/rules.mk |
3 | 34 | |
35 | ###################################### | |
0 | 36 | |
37 | testers: $(TESTERS) | |
38 | ||
39 | libtu.a: $(OBJS) | |
9 | 40 | $(AR) $(ARFLAGS) $@ $+ |
29 | 41 | $(RANLIB) $@ |
42 | ||
8 | 43 | tester: tester.c libtu.a |
9 | 44 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 45 | |
46 | tester2: tester2.c libtu.a | |
9 | 47 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 48 | |
49 | tester3: tester3.c libtu.a | |
9 | 50 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 51 | |
3 | 52 | _install: |
23 | 53 | $(INSTALLDIR) $(LIBDIR) |
30 | 54 | $(INSTALLDIR) $(INCDIR)/libtu |
3 | 55 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
58 | 56 | for i in $(HEADERS); do \ |
30 | 57 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ |
8 | 58 | done |