Sat, 08 Mar 2003 15:55:01 +0100
trunk: changeset 50
Added CONFOPTS_NOT_SET and parse_config_tokz_skip_section.
3 | 1 | ## |
2 | ## libtu Makefile | |
3 | ## | |
0 | 4 | |
3 | 5 | # System-specific configuration is in system.mk |
44 | 6 | TOPDIR=. |
7 | include system-inc.mk | |
0 | 8 | |
9 | ###################################### | |
10 | ||
5 | 11 | INCLUDES += -I./include |
16 | 12 | CFLAGS += $(POSIX_SOURCE) |
5 | 13 | |
34 | 14 | OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o map.o |
0 | 15 | |
27 | 16 | ifdef LIBTU_NO_ERRMSG |
28 | 17 | DEFINES += -DLIBTU_NO_ERRMSG |
27 | 18 | else |
25 | 19 | ifndef HAS_SYSTEM_ASPRINTF |
35 | 20 | OBJS += snprintf_2.2/snprintf.o |
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 | ||
3 | 31 | include rules.mk |
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 |