Wed, 19 Apr 2000 22:03:38 +0200
trunk: changeset 6
- Simpler optparser
- New Makefile system
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 | ||
10 | OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o | |
11 | ||
12 | LIBDIR=$(PREFIX)/lib | |
13 | INCDIR=$(PREFIX)/include/libtu | |
14 | ||
15 | TARGETS=libtu.a | |
16 | TESTERS=tester tester2 tester3 | |
17 | ||
18 | ###################################### | |
19 | ||
3 | 20 | include rules.mk |
21 | ||
22 | ###################################### | |
0 | 23 | |
24 | testers: $(TESTERS) | |
25 | ||
26 | libtu.a: $(OBJS) | |
27 | $(AR) $(AR_FLAGS) $@ $+ | |
28 | ||
1 | 29 | %: %.c libtu.a |
0 | 30 | $(CC) $(CC_FLAGS) $+ -L. -ltu -lm -o $@ |
31 | ||
3 | 32 | _install: |
0 | 33 | $(INSTALL) -d $(LIBDIR) |
34 | $(INSTALL) -d $(INCDIR) | |
3 | 35 | $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR) |
36 | $(INSTALL) -m $(DATA_MODE) include/*.h $(INCDIR) | |
0 | 37 |