Sat, 22 Apr 2000 17:34:20 +0200
trunk: changeset 11
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 |
11 | ||
0 | 12 | OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o |
13 | ||
14 | LIBDIR=$(PREFIX)/lib | |
15 | INCDIR=$(PREFIX)/include/libtu | |
16 | ||
17 | TARGETS=libtu.a | |
18 | TESTERS=tester tester2 tester3 | |
19 | ||
20 | ###################################### | |
21 | ||
3 | 22 | include rules.mk |
23 | ||
24 | ###################################### | |
0 | 25 | |
26 | testers: $(TESTERS) | |
27 | ||
28 | libtu.a: $(OBJS) | |
29 | $(AR) $(AR_FLAGS) $@ $+ | |
30 | ||
8 | 31 | tester: tester.c libtu.a |
32 | $(CC) $(CC_FLAGS) $< -L. -ltu -lm -o $@ | |
33 | ||
34 | tester2: tester2.c libtu.a | |
35 | $(CC) $(CC_FLAGS) $< -L. -ltu -lm -o $@ | |
36 | ||
37 | tester3: tester3.c libtu.a | |
38 | $(CC) $(CC_FLAGS) $< -L. -ltu -lm -o $@ | |
0 | 39 | |
3 | 40 | _install: |
0 | 41 | $(INSTALL) -d $(LIBDIR) |
42 | $(INSTALL) -d $(INCDIR) | |
3 | 43 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
8 | 44 | for i in include/libtu/*.h; do \ |
45 | $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR); \ | |
46 | done |