Wed, 16 Apr 2003 09:09:34 +0200
trunk: changeset 56
set_warn_handler returns default_warn_handler instead of NULL when no
other warn handlers are set.
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 |
16 | 12 | CFLAGS += $(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 | |
28 | ||
29 | ###################################### | |
30 | ||
48 | 31 | include $(TOPDIR)/rules.mk |
3 | 32 | |
33 | ###################################### | |
0 | 34 | |
35 | testers: $(TESTERS) | |
36 | ||
37 | libtu.a: $(OBJS) | |
9 | 38 | $(AR) $(ARFLAGS) $@ $+ |
29 | 39 | $(RANLIB) $@ |
40 | ||
8 | 41 | tester: tester.c libtu.a |
9 | 42 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 43 | |
44 | tester2: tester2.c libtu.a | |
9 | 45 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 46 | |
47 | tester3: tester3.c libtu.a | |
9 | 48 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 49 | |
3 | 50 | _install: |
23 | 51 | $(INSTALLDIR) $(LIBDIR) |
30 | 52 | $(INSTALLDIR) $(INCDIR)/libtu |
3 | 53 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
8 | 54 | for i in include/libtu/*.h; do \ |
30 | 55 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ |
8 | 56 | done |