diff options
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | COPYING | 1 | ||||
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | bench.c | 1 |
4 files changed, 29 insertions, 3 deletions
@@ -1,2 +1,6 @@ +*\#* *~ -/a.out +*.out +*.o +*.su +/bench @@ -2,4 +2,3 @@ Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. - diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d1ce94a --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +.POSIX: + +CC = cc + +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE +CFLAGS = -std=c99 -Wall -O2 +LDFLAGS = -s + + +all: bench + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +.o: + $(CC) -o $@ $< $(LDFLAGS) + +clean: + -rm -f -- bench *.o *.su + +.SUFFIXES: +.SUFFIXES: .o .c + +.PHONY: all clean @@ -1,4 +1,3 @@ -#define _GNU_SOURCE #include <sys/socket.h> #include <sys/uio.h> #include <sys/wait.h> |