Tue, 16 Mar 2004 21:38:58 +0100
trunk: changeset 1411
Removed superfluous include flag.
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 | ||
57 | 11 | CFLAGS += $(C89_SOURCE) $(POSIX_SOURCE) |
5 | 12 | |
60 | 13 | SOURCES=misc.c output.c util.c optparser.c parser.c tokenizer.c \ |
65 | 14 | map.c obj.c objlist.c errorlog.c symlist.c rb.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) |
60 | 54 | for i in *.h; do \ |
30 | 55 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ |
8 | 56 | done |