From 0e3933eb0c95a6bb3cfc78faa9d8299704c2a230 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 8 Apr 2020 01:00:47 +0930 Subject: game works --- makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..cf00d22 --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +TARGET = csweeper +LIBS = +CC = gcc +CFLAGS = -g -Wall -Wextra -std=c99 + +.PHONY: default all clean + +default: $(TARGET) +all: default + +OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) +HEADERS = $(wildcard *.h) + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +.PRECIOUS: $(TARGET) $(OBJECTS) + +$(TARGET): $(OBJECTS) + $(CC) $(OBJECTS) -Wall $(LIBS) -o $@ + +clean: + -rm -f *.o + -rm -f $(TARGET) + -- cgit v1.2.3