diff --git a/Makefile b/Makefile index 11c1804..663d57e 100644 --- a/Makefile +++ b/Makefile @@ -35,27 +35,27 @@ .SECONDEXPANSION: -$(BUILD_DIR)/hello-linux-64: | $$(@D)/. +$(BUILD_DIR)/hello-linux-64: Test.cpp $$(@D)/ @echo "Building Linux binary..." - @x86_64-linux-gnu-g++ Test.cpp -o build/hello-linux-64 + @x86_64-linux-gnu-g++ $< -o $@ -$(BUILD_DIR)/hello-win64.exe: | $$(@D)/. +$(BUILD_DIR)/hello-win64.exe: Test.cpp $$(@D)/ @echo "Building Windows binary..." - @x86_64-w64-mingw32-g++ Test.cpp -o build/hello-win64.exe + @x86_64-w64-mingw32-g++ $< -o $@ -$(BUILD_DIR)/hello-macosx.bin: | $$(@D)/. +$(BUILD_DIR)/hello-macosx.bin: Test.cpp $$(@D)/ @echo "Building MacOSX binary..." - @x86_64-apple-darwin19-c++ Test.cpp -o build/hello-macosx.bin + @x86_64-apple-darwin19-c++ $< -o $@ tidy: $(BUILD_DIR)/tidy.xml -$(BUILD_DIR)/tidy.xml: | $$(@D)/. +$(BUILD_DIR)/tidy.xml: $$(@D)/ @chmod u+x ./clang-tidy-to-junit.py @clang-tidy -checks='c*,l*,m*' $(SOURCES) -- $(CXXFLAGS) | ./clang-tidy-to-junit.py $(PWD)/ > $@ test: $(BUILD_DIR)/tests.xml -$(BUILD_DIR)/tests.xml: | $$(@D)/. +$(BUILD_DIR)/tests.xml: $$(@D)/ @echo '' > $@ @echo '' >> $@ @echo '' >> $@