Mercurial > hg > index.cgi
comparison Makefile @ 8:fdc11ef4115b
Switched lwlink to lw_cmdline from argp and also brought in lw_alloc and lw_string to replace util.c
author | lost@l-w.ca |
---|---|
date | Sat, 22 Jan 2011 09:58:24 -0700 |
parents | d4eb3c328a47 |
children | 6eed14cccac9 |
comparison
equal
deleted
inserted
replaced
7:917b608b8c66 | 8:fdc11ef4115b |
---|---|
30 lwobjdump: lwlink/lwobjdump | 30 lwobjdump: lwlink/lwobjdump |
31 | 31 |
32 lwasm/lwasm: $(lwasm_objs) lwlib lwasm/rules.make | 32 lwasm/lwasm: $(lwasm_objs) lwlib lwasm/rules.make |
33 $(CC) -o $@ $(lwasm_objs) $(LDFLAGS) | 33 $(CC) -o $@ $(lwasm_objs) $(LDFLAGS) |
34 | 34 |
35 lwlink/lwlink: $(lwlink_objs) lwlink/rules.make | 35 lwlink/lwlink: $(lwlink_objs) lwlib lwlink/rules.make |
36 $(CC) -o $@ $(lwlink_objs) | 36 $(CC) -o $@ $(lwlink_objs) $(LDFLAGS) |
37 | 37 |
38 lwlink/lwobjdump: $(lwobjdump_objs) lwlink/rules.make | 38 lwlink/lwobjdump: $(lwobjdump_objs) lwlib lwlink/rules.make |
39 $(CC) -o $@ $(lwobjdump_objs) | 39 $(CC) -o $@ $(lwobjdump_objs) $(LDFLAGS) |
40 | 40 |
41 lwar/lwar: $(lwar_objs) lwar/rules.make | 41 lwar/lwar: $(lwar_objs) lwar/rules.make |
42 $(CC) -o $@ $(lwar_objs) | 42 $(CC) -o $@ $(lwar_objs) |
43 | 43 |
44 test: test.c lwlib | |
45 $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ test.c $(LDFLAGS) | |
44 | 46 |
45 .PHONY: lwlib | 47 .PHONY: lwlib |
46 lwlib: lwlib/liblw.a | 48 lwlib: lwlib/liblw.a |
47 | 49 |
48 lwlib/liblw.a: $(lwlib_objs) lwlib/rules.make | 50 lwlib/liblw.a: $(lwlib_objs) lwlib/rules.make |
49 $(AR) rc $@ $^ | 51 $(AR) rc $@ $(lwlib_objs) |
50 | 52 |
51 %.d: %.c | 53 %.d: %.c |
52 @echo "Building dependencies for $@" | 54 # @echo "Building dependencies for $@" |
53 @$(CC) -MM $(CPPFLAGS) -o $*.d $< | 55 @$(CC) -MM $(CPPFLAGS) -o $*.d $< |
54 @mv -f $*.d $*.d.tmp | 56 @mv -f $*.d $*.d.tmp |
55 @sed -e 's|.*:|$*.o $*.d:|' < $*.d.tmp > $*.d | 57 @sed -e 's|.*:|$*.o $*.d:|' < $*.d.tmp > $*.d |
56 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d | 58 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d |
57 @rm -f $*.d.tmp | 59 @rm -f $*.d.tmp |