Mon, 16 Feb 2004 18:50:28 +0100
trunk: changeset 1318
Switched to using spaces only for indentation. Simple automatic "\t"
-> " " conversion; may need tuning later.
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 | |
60 | 14 | SOURCES=misc.c output.c util.c optparser.c parser.c tokenizer.c \ |
15 | map.c obj.c objlist.c errorlog.c symlist.c | |
0 | 16 | |
27 | 17 | ifdef LIBTU_NO_ERRMSG |
28 | 18 | DEFINES += -DLIBTU_NO_ERRMSG |
27 | 19 | else |
25 | 20 | ifndef HAS_SYSTEM_ASPRINTF |
48 | 21 | SOURCES += snprintf_2.2/snprintf.c |
25 | 22 | else |
28 | 23 | DEFINES += -DHAS_SYSTEM_ASPRINTF |
25 | 24 | endif |
27 | 25 | endif |
25 | 26 | |
0 | 27 | TARGETS=libtu.a |
28 | TESTERS=tester tester2 tester3 | |
29 | ||
30 | ###################################### | |
31 | ||
48 | 32 | include $(TOPDIR)/rules.mk |
3 | 33 | |
34 | ###################################### | |
0 | 35 | |
36 | testers: $(TESTERS) | |
37 | ||
38 | libtu.a: $(OBJS) | |
9 | 39 | $(AR) $(ARFLAGS) $@ $+ |
29 | 40 | $(RANLIB) $@ |
41 | ||
8 | 42 | tester: tester.c libtu.a |
9 | 43 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 44 | |
45 | tester2: tester2.c libtu.a | |
9 | 46 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 47 | |
48 | tester3: tester3.c libtu.a | |
9 | 49 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 50 | |
3 | 51 | _install: |
23 | 52 | $(INSTALLDIR) $(LIBDIR) |
30 | 53 | $(INSTALLDIR) $(INCDIR)/libtu |
3 | 54 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
60 | 55 | for i in *.h; do \ |
30 | 56 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \ |
8 | 57 | done |