aboutsummaryrefslogtreecommitdiff
path: root/week-1/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'week-1/makefile')
-rw-r--r--week-1/makefile22
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