-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmakefile
More file actions
27 lines (22 loc) · 735 Bytes
/
makefile
File metadata and controls
27 lines (22 loc) · 735 Bytes
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
# minimalist makefile
.SUFFIXES:
#
.SUFFIXES: .cpp .o .c .h
ifeq ($(DEBUG),1)
CFLAGS = -fPIC -std=c99 -ggdb -msse4.1 -march=native -Wall -Wextra -Wshadow -fsanitize=undefined -fno-omit-frame-pointer -fsanitize=address
else
CFLAGS = -fPIC -std=c99 -O3 -msse4.1 -march=native -Wall -Wextra -Wshadow
endif # debug
all: unit
test:
./unit
HEADERS=./include/fastdelta.h
OBJECTS= fastdelta.o
fastdelta.o: ./src/fastdelta.c $(HEADERS)
$(CC) $(CFLAGS) -c ./src/fastdelta.c -Iinclude
example: ./example.c $(HEADERS) $(OBJECTS)
$(CC) $(CFLAGS) -o example ./example.c -Iinclude $(OBJECTS)
unit: ./tests/unit.c $(HEADERS) $(OBJECTS)
$(CC) $(CFLAGS) -o unit ./tests/unit.c -Iinclude $(OBJECTS)
clean:
rm -f unit *.o example