Fri, 27 Oct 2000 15:17:27 +0200
trunk: changeset 28
Added errmsg_* functions alike warn_* -- asprintf and vasprintf
required now.
3 | 1 | ## |
2 | ## libtu Makefile | |
3 | ## | |
0 | 4 | |
3 | 5 | # System-specific configuration is in system.mk |
6 | include system.mk | |
0 | 7 | |
8 | ###################################### | |
9 | ||
5 | 10 | INCLUDES += -I./include |
16 | 11 | CFLAGS += $(POSIX_SOURCE) |
5 | 12 | |
0 | 13 | OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o |
14 | ||
25 | 15 | ifndef HAS_SYSTEM_ASPRINTF |
16 | OBJS += ../snprintf_2.2/snprintf.o | |
17 | else | |
18 | CFLAGS += -DHAS_SYSTEM_ASPRINTF | |
19 | endif | |
20 | ||
0 | 21 | LIBDIR=$(PREFIX)/lib |
22 | INCDIR=$(PREFIX)/include/libtu | |
23 | ||
24 | TARGETS=libtu.a | |
25 | TESTERS=tester tester2 tester3 | |
26 | ||
27 | ###################################### | |
28 | ||
3 | 29 | include rules.mk |
30 | ||
31 | ###################################### | |
0 | 32 | |
33 | testers: $(TESTERS) | |
34 | ||
35 | libtu.a: $(OBJS) | |
9 | 36 | $(AR) $(ARFLAGS) $@ $+ |
0 | 37 | |
8 | 38 | tester: tester.c libtu.a |
9 | 39 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 40 | |
41 | tester2: tester2.c libtu.a | |
9 | 42 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 43 | |
44 | tester3: tester3.c libtu.a | |
9 | 45 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 46 | |
3 | 47 | _install: |
23 | 48 | $(INSTALLDIR) $(LIBDIR) |
49 | $(INSTALLDIR) $(INCDIR) | |
3 | 50 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
8 | 51 | for i in include/libtu/*.h; do \ |
52 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR); \ | |
53 | done |