summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d091e68
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+CFLAGS = -D_POSIX_C_SOURCE=200809L -O2 -Wall
+
+SRCS = $(sort $(wildcard *.c))
+OBJS = $(SRCS:.c=.o)
+
+all: latency
+
+clean:
+ rm -f latency
+ rm -f $(OBJS)
+
+latency: $(OBJS)
+ $(CC) $(CFLAGS) $^ -o $@
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+.PHONY: all clean