From e6a5c821e62b037afb3e5f1fa86a418ccbec2fd2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:38:50 +0200 Subject: Misc improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .gitignore | 6 +++++- COPYING | 1 - Makefile | 24 ++++++++++++++++++++++++ bench.c | 1 - 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 8da825a..35eebe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +*\#* *~ -/a.out +*.out +*.o +*.su +/bench diff --git a/COPYING b/COPYING index 7fd7747..662cfe1 100644 --- a/COPYING +++ b/COPYING @@ -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 diff --git a/bench.c b/bench.c index abf2be8..22198fa 100644 --- a/bench.c +++ b/bench.c @@ -1,4 +1,3 @@ -#define _GNU_SOURCE #include #include #include -- cgit v1.2.3-70-g09d2