Tue, 29 Aug 2000 00:03:00 +0200
trunk: changeset 26
Once again, 'make install' portability fixes
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 | ||
15 | LIBDIR=$(PREFIX)/lib | |
16 | INCDIR=$(PREFIX)/include/libtu | |
17 | ||
18 | TARGETS=libtu.a | |
19 | TESTERS=tester tester2 tester3 | |
20 | ||
21 | ###################################### | |
22 | ||
3 | 23 | include rules.mk |
24 | ||
25 | ###################################### | |
0 | 26 | |
27 | testers: $(TESTERS) | |
28 | ||
29 | libtu.a: $(OBJS) | |
9 | 30 | $(AR) $(ARFLAGS) $@ $+ |
0 | 31 | |
8 | 32 | tester: tester.c libtu.a |
9 | 33 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 34 | |
35 | tester2: tester2.c libtu.a | |
9 | 36 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
8 | 37 | |
38 | tester3: tester3.c libtu.a | |
9 | 39 | $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ |
0 | 40 | |
3 | 41 | _install: |
23 | 42 | $(INSTALLDIR) $(LIBDIR) |
43 | $(INSTALLDIR) $(INCDIR) | |
3 | 44 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
8 | 45 | for i in include/libtu/*.h; do \ |
46 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR); \ | |
47 | done |