summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..563919e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CC = gcc
+CFLAGS = -Wall -Wextra -Wwrite-strings -Wconversion -Wno-sign-conversion \
+ -std=c11 -g -fwrapv -I$(TERMIO_PREFIX)/include
+LDFLAGS = -L$(TERMIO_PREFIX)/lib -ltermio
+
+TERMIO_PREFIX = $(HOME)/prefix
+
+BIN = regexbattle
+
+obj_files = $(patsubst %.c,%.o,$(wildcard *.c))
+
+.PHONY: all clean remake
+
+all: $(BIN)
+
+clean:
+ rm -rf $(BIN) *.o *.dSYM
+
+remake: clean
+ make all
+
+$(BIN): $(obj_files)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+%.o: %.c *.h
+ $(CC) $(CFLAGS) -c -o $@ $<