diff options
Diffstat (limited to 'week.mk')
-rw-r--r-- | week.mk | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +CC = g++ +LD = g++ +RM = rm -f +TARGET = main +OUTPUT_ZIP = Huiswerk_2180996.zip + +LFLAGS += -lstdc++ + +SRCS := $(wildcard *.cpp) +OBJS := $(patsubst %.cpp,%.o, $(SRCS)) + +.PHONY: clean compile_commands zip + +all: $(TARGET) + +%.o: %.cpp + $(CC) -c $(CFLAGS) $< -o $@ + +$(TARGET): $(OBJS) + $(LD) $^ $(LFLAGS) -o $@ + +clean: + $(RM) $(TARGET) $(OBJS) $(OUTPUT_ZIP) + +compile_commands: clean + compiledb make -Bn + +zip: all + zip -q $(OUTPUT_ZIP) makefile $(wildcard *.cpp) $(wildcard *.h) $(wildcard *.hpp) + |