-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
25 lines (22 loc) · 901 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# minimalist makefile
.SUFFIXES:
#
.SUFFIXES: .cpp .o .c .h
ifeq ($(DEBUG),1)
CFLAGS = -fPIC -std=c99 -ggdb -Wall -Wextra -Wshadow -fsanitize=undefined -fno-omit-frame-pointer -fsanitize=address
else
CFLAGS = -fPIC -std=c99 -O3 -Wall -Wextra -Wshadow
endif # debug
OBJECTS=bitset.o
all: unit benchmark lemirebenchmark $(OBJECTS)
HEADERS=./include/bitset.h ./include/portability.h
bitset.o: ./src/bitset.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/bitset.c -Iinclude
unit: bitset.o ./tests/unit.c $(HEADERS)
$(CC) $(CFLAGS) -o unit ./tests/unit.c bitset.o -Iinclude
lemirebenchmark: bitset.o ./benchmarks/lemirebenchmark.c $(HEADERS)
$(CC) $(CFLAGS) -o lemirebenchmark ./benchmarks/lemirebenchmark.c bitset.o -Iinclude
benchmark: bitset.o ./benchmarks/benchmark.c $(HEADERS)
$(CC) $(CFLAGS) -o benchmark ./benchmarks/benchmark.c bitset.o -Iinclude
clean:
rm -f *.o unit benchmark lemirebenchmark