diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -26,20 +26,20 @@ clean: | |||
26 | 26 | ||
27 | # This bit I cribbed from the docs, seems to work great though! | 27 | # This bit I cribbed from the docs, seems to work great though! |
28 | %.d: %.cpp | 28 | %.d: %.cpp |
29 | g++ $(CXXFLAGS) -Isrc -M $(CPPFLAGS) $< | sed 's,\($(notdir $*)\)\.o[: ]*,$(dir $*)\1.o $@: ,g' > $@ | ||
30 | echo "$(TXTDEP)$@" | 29 | echo "$(TXTDEP)$@" |
30 | g++ $(CXXFLAGS) -Isrc -M $(CPPFLAGS) $< | sed 's,\($(notdir $*)\)\.o[: ]*,$(dir $*)\1.o $@: ,g' > $@ | ||
31 | 31 | ||
32 | %.o: %.cpp | 32 | %.o: %.cpp |
33 | g++ $(CXXFLAGS) -Isrc $(foreach dr,$(filter $(dir $@),$(foreach ddr,$(TDIRS),$(ddr)/)),-I$(dr)) -ggdb -c -o $@ $< | ||
34 | echo "$(TXTCPP)$@" | 33 | echo "$(TXTCPP)$@" |
34 | g++ $(CXXFLAGS) -Isrc $(foreach dr,$(filter $(dir $@),$(foreach ddr,$(TDIRS),$(ddr)/)),-I$(dr)) -ggdb -c -o $@ $< | ||
35 | 35 | ||
36 | $(LIB): $(OBJS) | 36 | $(LIB): $(OBJS) |
37 | ar cr $(LIB) $(OBJS) | ||
38 | echo "$(TXTARC)$@" | 37 | echo "$(TXTARC)$@" |
38 | ar cr $(LIB) $(OBJS) | ||
39 | 39 | ||
40 | $(TESTS): $(ATOBJS) $(LIB) | 40 | $(TESTS): $(ATOBJS) $(LIB) |
41 | g++ $(LDFLAGS) -ggdb $(filter %$@.o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$@, $(TDIRS))/*.cpp)) -L. -lbu++ -o $@ | ||
42 | echo "$(TXTLNK)$@" | 41 | echo "$(TXTLNK)$@" |
42 | g++ $(LDFLAGS) -ggdb $(filter %$@.o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$@, $(TDIRS))/*.cpp)) -L. -lbu++ -o $@ | ||
43 | 43 | ||
44 | tests: $(TESTS) | 44 | tests: $(TESTS) |
45 | 45 | ||