From 6cda6a35647b5faad8914b66f277e5bf645bbfd2 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 3 Oct 2022 10:34:53 +0200 Subject: week 6 huiswerk toegevoegd --- week-6/makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 week-6/makefile (limited to 'week-6/makefile') diff --git a/week-6/makefile b/week-6/makefile new file mode 100644 index 0000000..3b71b5b --- /dev/null +++ b/week-6/makefile @@ -0,0 +1,24 @@ +CC = gcc +LD = gcc +RM = rm -f +TARGET = main + +LFLAGS += -lstdc++ + +SRCS := $(wildcard *.cpp) +OBJS := $(patsubst %.cpp,%.o, $(SRCS)) + +all: main + +%.o: %.cpp + $(CC) -c $(CFLAGS) $< -o $@ + +$(TARGET): $(OBJS) + $(LD) $^ $(LFLAGS) -o $@ + +clean: + $(RM) $(TARGET) $(OBJS) + +compile_commands: clean + compiledb make + -- cgit v1.2.3