diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | makefile | 12 | ||||
-rw-r--r-- | week.mk | 6 |
3 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,4 @@ **/*.o **/*.pdf **/main +**/compile_commands.json @@ -1,8 +1,16 @@ MK = make -j WEKEN = $(wildcard week-*) +submake = $(foreach WEEK,$(WEKEN), $(MK) -C $(WEEK) $(1);) + all: - $(foreach WEEK,$(WEKEN), $(MK) -C $(WEEK);) + $(call submake) clean: - $(foreach WEEK,$(WEKEN), $(MK) -C $(WEEK) clean;) + $(call submake, clean) + +compile_commands: + $(call submake, compile_commands) + +zip: + $(call submake, zip) @@ -2,6 +2,7 @@ CC = g++ LD = g++ RM = rm -f TARGET = main +OUTPUT_ZIP = Huiswerk_2180996.zip LFLAGS += -lstdc++ @@ -17,8 +18,11 @@ $(TARGET): $(OBJS) $(LD) $^ $(LFLAGS) -o $@ clean: - $(RM) $(TARGET) $(OBJS) + $(RM) $(TARGET) $(OBJS) $(OUTPUT_ZIP) compile_commands: clean compiledb make +zip: all + zip -q $(OUTPUT_ZIP) makefile $(wildcard *.cpp) $(wildcard *.h) $(wildcard *.hpp) + |