aboutsummaryrefslogtreecommitdiff
path: root/client/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-17 23:16:21 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-17 23:16:21 +0100
commit012f9e4156919157bfff0d5ce8f105a04b0c4a70 (patch)
treecacce5438a0e6fa8baef4ee4ef96951d7b1dd8a4 /client/Makefile
parentadd6b39aece179a0e0ad425af72b8a043a0d3188 (diff)
client: Start working on a simple client
Diffstat (limited to 'client/Makefile')
-rw-r--r--client/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/client/Makefile b/client/Makefile
new file mode 100644
index 0000000..e9bbb91
--- /dev/null
+++ b/client/Makefile
@@ -0,0 +1,30 @@
+CC = gcc
+CFLAGS = -Wall -Wextra -std=c11 -g -fwrapv -I$(TERMIO)/include
+LDFLAGS = -L$(TERMIO)/lib -ltermio
+
+TERMIO = $(HOME)/prefix
+
+TARGETS = client
+
+.PHONY: all clean remake
+
+# Clear all implicit suffix rules
+.SUFFIXES:
+
+# Don't delete intermediate files
+.SECONDARY:
+
+all: $(TARGETS)
+
+clean:
+ rm -f $(TARGETS) *.o
+
+remake: clean
+ $(MAKE) all
+
+
+$(TARGETS): $(patsubst %.c,%.o,$(wildcard *.c))
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+%.o: %.c $(wildcard *.h)
+ $(CC) $(CFLAGS) -c -o $@ $<