forked from jiazhang0/cryptfs-tpm2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.mk
More file actions
55 lines (46 loc) · 1.42 KB
/
env.mk
File metadata and controls
55 lines (46 loc) · 1.42 KB
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
45
46
47
48
49
50
51
52
53
54
55
CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
LD := $(CROSS_COMPILE)ld
CCLD := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
INSTALL ?= install
PKG_CONFIG ?= pkg-config
EXTRA_CFLAGS ?=
EXTRA_LDFLAGS ?=
DEBUG_BUILD ?=
TSS2_VER ?= 2
prefix ?= /usr
libdir ?= $(prefix)/lib64
sbindir ?= $(prefix)/sbin
includedir ?= $(prefix)/include
tpm2_tss_includedir ?= $(includedir)
tpm2_tss_libdir ?= $(libdir)
tpm2_tabrmd_includedir ?= $(includedir)
# For the installation
DESTDIR ?=
LIBDIR ?= $(libdir)
SBINDIR ?= $(sbindir)
# The authorization password for the primary key
primary_key_secret ?= H31i05
# The authorization password for the passphrase
passphrase_secret ?= h31i05
# The byte code used to encrypt/decrypt secrets
secret_xor_byte_code ?= 0x48
LDFLAGS := --warn-common --no-undefined --fatal-warnings \
$(patsubst $(join -Wl,,)%,%,$(EXTRA_LDFLAGS))
CFLAGS := -D_GNU_SOURCE -std=gnu99 -O2 -Wall -Werror \
$(addprefix -I, $(TOPDIR)/src/include \
$(tpm2_tss_includedir) $(tpm2_tabrmd_includedir) \
$(glib_includedir)) \
$(addprefix $(join -L,), $(tpm2_tss_libdir)) \
`$(PKG_CONFIG) --cflags glib-2.0` \
`$(PKG_CONFIG) --libs glib-2.0` \
$(EXTRA_CFLAGS) $(addprefix $(join -Wl,,),$(LDFLAGS))
ifneq ($(TSS2_VER), 1)
CFLAGS += -ldl -ltss2-sys -ltss2-tcti-mssim -ltss2-tcti-device
else
CFLAGS += -ldl -lsapi -ltcti-socket -ltcti-device -DTSS2_LEGACY_V1
endif
ifneq ($(DEBUG_BUILD),)
CFLAGS += -ggdb -DDEBUG
endif