diff options
| author | lonkaars <loek@pipeframe.xyz> | 2022-09-20 14:32:30 +0200 |
|---|---|---|
| committer | lonkaars <loek@pipeframe.xyz> | 2022-09-20 14:32:30 +0200 |
| commit | 65a021b35340150aa6331c4b482ebfb88446be57 (patch) | |
| tree | dd44675dfb118e604d6938f1f1168caed57af6ab /week-4/makefile | |
| parent | afe7337bd1230dfbed207ead0655f3b8a2362180 (diff) | |
week 4 huiswerk toegevoegd
Diffstat (limited to 'week-4/makefile')
| -rw-r--r-- | week-4/makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/week-4/makefile b/week-4/makefile new file mode 100644 index 0000000..3b71b5b --- /dev/null +++ b/week-4/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 + |