diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-09-08 09:22:46 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-09-08 09:22:46 +0200 |
commit | e15333e1987bda84fd787eec8e78ea98f95a77a7 (patch) | |
tree | 3f3b474e5eb10629a73dbcf39a5c849786e4f85a /week-1/makefile |
week 1/2 huiswerk toegevoegd
Diffstat (limited to 'week-1/makefile')
-rw-r--r-- | week-1/makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/week-1/makefile b/week-1/makefile new file mode 100644 index 0000000..8ab5b1c --- /dev/null +++ b/week-1/makefile @@ -0,0 +1,22 @@ +CC = g++ +LD = g++ +RM = rm -f +CFLAGS = +EXECNAME = main + +SOURCES := $(wildcard *.cpp) +OBJECTS := $(patsubst %.cpp,%.o, $(SOURCES)) + +all: main + +.o: + $(CC) -c $(CFLAGS) $< + +$(EXECNAME): $(OBJECTS) + $(CC) $(OBJECTS) -o $(EXECNAME) + +clean: + $(RM) $(EXECNAME) + +distclean: clean + $(RM) *.o |