diff options
| author | Peter H. Froehlich <peter.hans.froehlich@gmail.com> | 2021-02-13 20:06:01 +0100 |
|---|---|---|
| committer | Peter H. Froehlich <peter.hans.froehlich@gmail.com> | 2021-02-13 20:06:01 +0100 |
| commit | 8eee983028751ef16f0700eae777a48b10e722b6 (patch) | |
| tree | 3422b4317fb12a576992f7ceb3c25c697e0f60bb /Makefile | |
| parent | f94fcf7052d45be9842bca09d813b45e3da8d0c3 (diff) | |
| download | simple-allocators-8eee983028751ef16f0700eae777a48b10e722b6.tar.gz | |
Big-ish rework and cleanup; a README even.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -1,19 +1,35 @@ -CFLAGS=-std=gnu11 -Wall -Wextra -Wpedantic -Og -g -D_DEFAULT_SOURCE \ - -fsanitize=undefined -fsanitize=address -LDFLAGS=-fsanitize=undefined -fsanitize=address +CFLAGS+=-std=c11 -Wall -Wextra -Wpedantic +CFLAGS+=-D_DEFAULT_SOURCE ALL=bench -all: $(ALL) +dev: CFLAGS+=-Og -g3 +dev: CFLAGS+=-fsanitize=undefined -fsanitize=address +dev: LDFLAGS+=-fsanitize=undefined -fsanitize=address +dev: $(ALL) + +prod: CFLAGS+=-O2 -s +prod: LDFLAGS+=-s +prod: $(ALL) + +musl: CC=musl-gcc +musl: CFLAGS+=-Os -s +musl: LDFLAGS+=-static -s +musl: $(ALL) bench: bench.o arena.o cached.o pool.o -clean: - $(RM) $(ALL) *.o +bench.o: bench.c arena.h cached.h pool.h -.PHONY: all check clean format +arena.o: arena.c arena.h +cached.o: cached.c cached.h +pool.o: pool.c pool.h +clean: + $(RM) $(ALL) *.o check: cppcheck --enable=all --std=c11 *.[ch] format: clang-format -i *.[ch] + +.PHONY: dev prod musl check clean format |