Skip to content

Commit

Permalink
Add a 'clean-pch' target to Makefile that cleans PCH
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Feb 14, 2021
1 parent 1e40b42 commit 9a3b65e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -962,16 +962,13 @@ $(CHKJSON_BIN): $(CHKJSON_SOURCES)
json-check: $(CHKJSON_BIN)
./$(CHKJSON_BIN)

clean: clean-tests clean-object_creator
clean: clean-tests clean-object_creator clean-pch
rm -rf *$(TARGET_NAME) *$(TILES_TARGET_NAME)
rm -rf *$(TILES_TARGET_NAME).exe *$(TARGET_NAME).exe *$(TARGET_NAME).a
rm -rf *obj *objwin
rm -rf *$(BINDIST_DIR) *cataclysmdda-*.tar.gz *cataclysmdda-*.zip
rm -f $(SRC_DIR)/version.h
rm -f $(CHKJSON_BIN)
rm -f pch/*pch.hpp.gch
rm -f pch/*pch.hpp.pch
rm -f pch/*pch.hpp.d

distclean:
rm -rf *$(BINDIST_DIR)
Expand Down Expand Up @@ -1215,7 +1212,12 @@ object_creator: version $(BUILD_PREFIX)cataclysm.a
clean-object_creator:
$(MAKE) -C object_creator clean

.PHONY: tests check ctags etags clean-tests install lint
clean-pch:
rm -f pch/*pch.hpp.gch
rm -f pch/*pch.hpp.pch
rm -f pch/*pch.hpp.d

.PHONY: tests check ctags etags clean-tests clean-object_creator clean-pch install lint

-include $(SOURCES:$(SRC_DIR)/%.cpp=$(DEPDIR)/%.P)
-include ${OBJS:.o=.d}

0 comments on commit 9a3b65e

Please sign in to comment.