summaryrefslogtreecommitdiff
path: root/utility/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utility/Makefile')
-rw-r--r--utility/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/utility/Makefile b/utility/Makefile
index e0a0f221..59d624a5 100644
--- a/utility/Makefile
+++ b/utility/Makefile
@@ -40,6 +40,8 @@ TARGET_NAMES = crossystem \
ifeq ($(MINIMAL),)
TARGET_NAMES += bmpblk_font bmpblk_utility eficompress efidecompress
+else
+TARGET_NAMES += mount-encrypted
endif
TARGET_BINS = $(addprefix ${BUILD_ROOT}/,$(TARGET_NAMES))
@@ -157,6 +159,22 @@ ${BUILD_ROOT}/vbutil_what_keys: vbutil_what_keys
${BUILD_ROOT}/tpmc: tpmc.c $(LIBS)
$(CC) $(CFLAGS) $< -o $@ $(LIBS)
+${BUILD_ROOT}/mount-helpers.o: mount-helpers.c mount-helpers.h mount-encrypted.h
+ $(CC) -Wall -Werror -O2 -D_FORTIFY_SOURCE=2 -fstack-protector \
+ $(shell pkg-config --cflags glib-2.0 openssl) \
+ -c $< -o $@
+
+# The embedded libcrypto includes conflict with the shipped openssl,
+# so this builds without the common CFLAGS (and those includes).
+${BUILD_ROOT}/mount-encrypted: mount-encrypted.c mount-encrypted.h \
+ ${BUILD_ROOT}/mount-helpers.o $(LIBS)
+ $(CC) -Wall -Werror -O2 -D_FORTIFY_SOURCE=2 -fstack-protector \
+ $(shell pkg-config --cflags glib-2.0 openssl) \
+ -I$(FWDIR)/include \
+ -I$(HOSTDIR)/include \
+ $< -o $@ $(shell pkg-config --libs glib-2.0 openssl) \
+ ${BUILD_ROOT}/mount-helpers.o $(LIBS)
+
${BUILD_ROOT}/dev_sign_file: dev_sign_file.c $(LIBS)
$(CC) $(CFLAGS) $< -o $@ $(LIBS) -lcrypto