aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..419a264
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+CC=gcc
+CFLAGS=-W --pedantic -Wall -std=c99 -D_GNU_SOURCE -O2
+LIBS=-lsodium
+COMPILE=$(CC) $(CFLAGS)
+
+SRC = $(wildcard *.c)
+OBJ = $(patsubst %.c, %.o, $(SRC))
+EXE = msr
+
+$(EXE): $(OBJ)
+ $(COMPILE) $(LIBS) -o $(EXE) $(OBJ)
+
+%.o: %.c
+ $(COMPILE) -c -o $@ $<
+
+clean:
+ $(RM) $(EXE) $(OBJ) nul
+
+check-syntax:
+ $(COMPILE) -o nul -S ${CHK_SOURCES}