summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7769ef5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+
+SRCS = $(sort $(wildcard *.c))
+OBJS = $(SRCS:.c=.o)
+
+CFLAGS = -Os -D_XOPEN_SOURCE=700
+LDFLAGS = -static
+LIBS = -lpthread -lrt -lpthread
+
+
+all: libc-bench
+
+clean:
+ rm -f $(OBJS) libc-bench
+
+test: all
+ ./libc-bench
+
+libc-bench: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<