diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2014-10-26 18:15:21 +0000 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2014-10-26 18:15:21 +0000 |
commit | f290b8cd7e40ed8688175fba312697f7da96a34e (patch) | |
tree | b9671094c14db5cd26bf5578dd95e19803eb6560 /Makefile |
game: Add a buildable version of the agme
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
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 |