summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-02-03 20:28:11 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-02-03 20:28:11 (GMT)
commit909007614922d1a23da894bc27696696d60c33ae (patch)
treee54d481cc8e24ccc83a010ef7017e49d48f3a0ca /Makefile
Initial commit.HEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2e68f25
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+
+CFLAGS=$(shell pkg-config libssl --cflags)
+LDFLAGS=$(shell pkg-config libssl --libs)
+
+all: cacert.pem servercert.pem clientcert.pem client server
+
+cacert.pem:
+ ./gen.sh ca
+
+servercert.pem: cacert.pem
+ ./gen.sh server
+
+clientcert.pem: cacert.pem
+ ./gen.sh client
+
+server: server.c common.h
+ colorgcc -o server -Wall $(CFLAGS) server.c $(LDFLAGS)
+
+client: client.c common.h
+ colorgcc -o client -Wall $(CFLAGS) client.c $(LDFLAGS)
+
+clean:
+ rm -f server client *~
+ ./gen.sh clean