summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5cccb18
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+
+SRCS = $(wildcard *.c)
+OBJS = $(SRCS:.c=.o)
+
+CFLAGS = -std=c99 -Os -fno-builtin -D_XOPEN_SOURCE=700
+LDFLAGS = -static
+LIBS = -lrt -lpthread -lrt -lm
+
+-include config.mak
+
+all: testsuite
+
+testsuite: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+clean:
+ rm -f $(OBJS) testsuite
+
+relink:
+ rm -f testsuite
+ make all
+
+test: testsuite
+ ./testsuite
+
+retest: relink test