-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
28 lines (19 loc) · 799 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
26
27
28
.PHONY: all clean test valgrind
EXECUTABLE := luksipc
BUILD_REVISION := $(shell git describe --abbrev=10 --dirty --always)
CFLAGS := -Wall -Wextra -Wshadow -Wswitch -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Werror=implicit-function-declaration -Werror=format
CFLAGS += -std=c11 -O2 -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -DBUILD_REVISION='"$(BUILD_REVISION)"'
#CFLAGS += -DDEVELOPMENT -g
LDFLAGS :=
OBJS := luksipc.o luks.o exec.o chunk.o parameters.o keyfile.o logging.o shutdown.o utils.o mount.o exit.o random.o
all: $(EXECUTABLE)
clean:
rm -f $(OBJS) $(EXECUTABLE) initial_keyfile.bin
test: all
./luksipc
valgrind: all
valgrind --leak-check=yes ./luksipc
luksipc: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(@) $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<