back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a73ba82
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+SRCMODULES = puzzle.cpp gameplay.cpp main.cpp
+OBJMODULES = $(SRCMODULES:.cpp=.o)
+CXX = g++
+CXXFLAGS = -Wall -g
+LIBS = -lfltk -lfltk_images
+
+all: main
+
+%.o: %.сpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+main: $(OBJMODULES)
+ $(CXX) $^ $(LIBS) -o $@
+
+ifneq (clean, $(MAKECMDGOALS))
+-include deps.mk
+endif
+
+deps.mk: $(SRCMODULES)
+ $(CC) -MM $^ > $@
+
+clean:
+ rm -f *.o main