-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmakefile
44 lines (30 loc) · 1.46 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# minimalist makefile
.SUFFIXES:
#
.SUFFIXES: .cpp .o .c .h
ifeq ($(DEBUG),1)
CFLAGS = -fPIC -std=c99 -ggdb -msse4.1 -march=native -Wall -Wextra -pedantic -Wshadow -fsanitize=undefined -fno-omit-frame-pointer -fsanitize=address
else
CFLAGS = -fPIC -std=c99 -O3 -msse4.1 -march=native -Wall -Wextra -pedantic -Wshadow
endif # debug
HEADERS=include/bitpacking.h include/portability.h include/util.h
OBJECTS= bmipacking32.o bitpacking32.o util.o turbobitpacking32.o scpacking32.o horizontalpacking32.o
all: $(OBJECTS) unit bitpackingbenchmark
unit : ./tests/unit.c $(HEADERS) $(OBJECTS)
$(CC) $(CFLAGS) -o unit ./tests/unit.c -Iinclude $(OBJECTS)
bitpackingbenchmark : ./benchmarks/bitpackingbenchmark.c $(HEADERS) $(OBJECTS)
$(CC) $(CFLAGS) -o bitpackingbenchmark ./benchmarks/bitpackingbenchmark.c -Iinclude $(OBJECTS)
bmipacking32.o: ./src/bmipacking32.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/bmipacking32.c -Iinclude
horizontalpacking32.o: ./src/horizontalpacking32.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/horizontalpacking32.c -Iinclude
turbobitpacking32.o: ./src/turbobitpacking32.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/turbobitpacking32.c -Iinclude
scpacking32.o: ./src/scpacking32.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/scpacking32.c -Iinclude
bitpacking32.o: ./src/bitpacking32.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/bitpacking32.c -Iinclude
util.o: ./src/util.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/util.c -Iinclude
clean:
rm -f $(OBJECTS) unit bitpackingbenchmark