From 3f6abb468bfcefff5bb02a851b3ef3706d9df6b7 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 9 Sep 2011 00:43:27 +0300 Subject: [PATCH] crhash: . --- .gitignore | 3 +++ Makefile | 32 ++++++++++++++++++++++++++++++++ main.c | 6 ++++++ 3 files changed, 41 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d583ea1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +.*.d +crhash diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ce3fb93 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +PHONY := + +OBJS := +OBJS += main.o + +CFLAGS ?= -march=native -O2 +CFLAGS += -pipe +CFLAGS += -std=c99 -pedantic-errors +CFLAGS += -fno-strict-aliasing +CFLAGS += -Wall + +LDFLAGS ?= -Wl,-O1 + +CFLAGS += -ggdb +LDFLAGS += -ggdb + +CFLAGS += -Wp,-MD,$(@D)/.$(@F).d + +PHONY += all +all: crhash + +crhash: $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) + +-include $(wildcard .*.d) + +PHONY += clean +clean: + $(RM) crhash $(OBJS) + @find . -type f -name '.*.d' -exec $(RM) {} \; + +.PHONY: $(PHONY) diff --git a/main.c b/main.c new file mode 100644 index 0000000..5717444 --- /dev/null +++ b/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + return EXIT_SUCCESS; +} -- 2.11.4.GIT