diff options
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 |