From f290b8cd7e40ed8688175fba312697f7da96a34e Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 26 Oct 2014 18:15:21 +0000 Subject: game: Add a buildable version of the agme Signed-off-by: Olivier Gayot --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..689b79f --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +CC ?= gcc +CFLAGS += -W -Wall -std=c99 -Wextra `sdl-config --cflags` +LDFLAGS += `sdl-config --libs` -lSDL_image -lSDL_ttf +NAME = a.out +SRC = $(wildcard *.c) + +all: depend $(NAME) + +depend: .depend + +.depend: $(SRC) + @$(RM) .depend + @$(CC) $(CFLAGS) -MM $^ > .depend + +include .depend + +OBJ = $(SRC:.c=.o) + +$(NAME): $(OBJ) + $(CC) -o $@ $^ $(LDFLAGS) + +clean: + $(RM) $(OBJ) + +fclean: clean + $(RM) $(NAME) + +re: fclean all + +.PHONY: all depend clean fclean all re -- cgit v1.2.3