diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ | |||
1 | OBJS:=$(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) | 1 | OBJS:=$(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) |
2 | TOBJS:=$(patsubst %.cpp,%.o,$(wildcard src/test/*.cpp)) | 2 | TOBJS:=$(patsubst %.cpp,%.o,$(wildcard src/test/*.cpp)) |
3 | TDIRS:=$(filter-out %.o %.cpp %.h %.d,$(wildcard src/test/*)) | 3 | TDIRS:=$(filter-out %.o %.cpp %.h %.d,$(wildcard src/test/*)) |
4 | TESTS:=$(patsubst src/test/%.o,%,$(TOBJS)) $(patsubst src/test/%,%,$(TDIRS)) | 4 | TESTS:=$(patsubst src/test/%.o,tests/%,$(TOBJS)) $(patsubst src/test/%,tests/%,$(TDIRS)) |
5 | ATOBJS:=$(TOBJS) $(patsubst %.cpp,%.o,$(foreach dr,$(TDIRS),$(wildcard $(dr)/*.cpp))) | 5 | ATOBJS:=$(TOBJS) $(patsubst %.cpp,%.o,$(foreach dr,$(TDIRS),$(wildcard $(dr)/*.cpp))) |
6 | LIB:=libbu++.a | 6 | LIB:=libbu++.a |
7 | DATE:=$(shell date +%F) | 7 | DATE:=$(shell date +%F) |
@@ -39,7 +39,7 @@ $(LIB): $(OBJS) | |||
39 | 39 | ||
40 | $(TESTS): $(ATOBJS) $(LIB) | 40 | $(TESTS): $(ATOBJS) $(LIB) |
41 | echo "$(TXTLNK)$@" | 41 | echo "$(TXTLNK)$@" |
42 | g++ $(LDFLAGS) -ggdb $(filter %$@.o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$@, $(TDIRS))/*.cpp)) -L. -lbu++ -o $@ | 42 | g++ $(LDFLAGS) -ggdb $(filter %$(patsubst tests/%,%,$@).o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$(patsubst tests/%,%,$@), $(TDIRS))/*.cpp)) -L. -lbu++ -o $@ |
43 | 43 | ||
44 | tests: $(TESTS) | 44 | tests: $(TESTS) |
45 | 45 | ||