summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-04-08 01:00:47 +0930
committerDaniel Jones <admin@danieljon.es>2020-04-08 01:00:47 +0930
commit0e3933eb0c95a6bb3cfc78faa9d8299704c2a230 (patch)
treef3de451f495d44d04329cd15b7ecc5904a7207f3 /makefile
downloadcsweeper-0e3933eb0c95a6bb3cfc78faa9d8299704c2a230.tar.gz
csweeper-0e3933eb0c95a6bb3cfc78faa9d8299704c2a230.zip
game works
Diffstat (limited to 'makefile')
-rw-r--r--makefile25
1 files changed, 25 insertions, 0 deletions
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)
+