aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7001c0b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+.POSIX:
+.SUFFIXES: .c .o
+
+CC = cc # c99 (default value) does not allow POSIX extensions.
+PROJECT = slcl
+O = -Og
+CFLAGS = $(O) -g -Wall -Idynstr/include -MD -MF -
+LIBS = -lcjson -lssl -lm -lcrypto
+LDFLAGS = $(LIBS)
+DEPS = $(OBJECTS:.o=.d)
+OBJECTS = \
+ auth.o \
+ base64.o \
+ handler.o \
+ html.o \
+ http.o \
+ jwt.o \
+ main.o \
+ page.o \
+ server.o \
+ dynstr/dynstr.o
+
+all: $(PROJECT)
+
+clean:
+ rm -f $(OBJECTS) $(DEPS)
+
+$(PROJECT): $(OBJECTS)
+ $(CC) $(OBJECTS) $(LDFLAGS) -o $@
+
+.c.o:
+ $(CC) $(CFLAGS) -c $< -o $@ > $(@:.o=.d)
+
+-include $(DEPS)