aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..102191d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CC = g++
+CCFLAGS = -Wall -Wextra
+LDFLAGS = $(shell sdl2-config --libs --cflags)
+
+NAME = flappy
+
+SRC = main.cpp graphics.cpp
+OBJ = $(SRC:.cpp=.o)
+
+all: $(NAME)
+
+$(NAME): $(OBJ)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+%.o: %.cpp
+ $(CC) $(CCFLAGS) -c -o $@ $<
+
+clean:
+ rm -f $(OBJ)
+
+fclean: clean
+ rm -f $(NAME)
+
+re: fclean all