osuplusplus/test/Makefile

26 lines
473 B
Makefile

INCLUDE += test
CXXFLAGS += $(addprefix -I, $(INCLUDE))
TEST = test
_TESTS = example.cpp input_stream_ops.cpp
TESTS = $(addprefix $(TEST)/, $(_TESTS))
OBJ = $(addprefix $(BIN)/, $(_TESTS:.cpp=))
.PHONY: all
all: dirs_test $(OBJ)
@echo
@echo "---------- STARTING TESTS ----------"
@echo
@$(foreach test,$(OBJ),./$(test);)
@echo
@echo "---------- FINISHED TESTS ----------"
@echo
dirs_test:
mkdir -p $(BIN)
$(BIN)/%: $(TEST)/%.cpp
$(CXX) $< $(CXXFLAGS) -o $@