Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: utility/Makefile

Issue 2845001: Rework the vboot_reference make system. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Rework the vboot_reference make system. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/run_vbutil_tests.sh ('k') | vboot_firmware/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utility/Makefile
diff --git a/utility/Makefile b/utility/Makefile
index 23c0b65dbf7f1c924b2400806c861a1bc2cf9f31..6a65e0beff974470862e58b6034505c8afb7823b 100644
--- a/utility/Makefile
+++ b/utility/Makefile
@@ -2,10 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-FWDIR ?= ../vboot_firmware/
-TOP ?= ../
-CC ?= gcc
-CXX ?= g++
INCLUDES += -I./include \
-I$(FWDIR)/lib/include \
-I$(FWDIR)/lib/cgptlib/include \
@@ -15,17 +11,20 @@ INCLUDES += -I./include \
-I../vfirmware/include\
-I../vboot_firmware/include\
-I../vkernel/include
-CFLAGS ?= -Wall -DNDEBUG -O3 -Werror $(INCLUDES)
-LIBS = $(TOP)/misclibs/file_keys.o \
- $(TOP)/misclibs/signature_digest.o \
- $(TOP)/vfirmware/firmware_image.o \
- $(TOP)/vkernel/kernel_image.o \
+CFLAGS += $(INCLUDES)
+CFLAGS += -MMD -MF $@.d
+LIBS = $(BUILD)/misclibs/file_keys.o \
+ $(BUILD)/misclibs/signature_digest.o \
+ $(BUILD)/vfirmware/firmware_image.o \
+ $(BUILD)/vkernel/kernel_image.o \
$(HOSTLIB) \
$(FWLIB)
+BUILD_ROOT = ${BUILD}/utility
+
DESTDIR ?= /usr/bin
-TARGET_BINS = dumpRSAPublicKey \
+TARGET_NAMES = dumpRSAPublicKey \
firmware_utility \
gbb_utility \
kernel_utility \
@@ -36,47 +35,47 @@ TARGET_BINS = dumpRSAPublicKey \
vbutil_keyblock \
verify_data
+TARGET_BINS = $(addprefix ${BUILD_ROOT}/,$(TARGET_NAMES))
+ALL_DEPS = $(addsuffix .d,${TARGET_BINS})
+
all: $(TARGET_BINS)
-dumpRSAPublicKey: dumpRSAPublicKey.c
+${BUILD_ROOT}/dumpRSAPublicKey: dumpRSAPublicKey.c
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ -lcrypto
-firmware_utility: firmware_utility.cc $(LIBS)
+${BUILD_ROOT}/firmware_utility: firmware_utility.cc $(LIBS)
$(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \
-o $@ $(LIBS) -lcrypto
-gbb_utility: gbb_utility.cc
- $(CXX) -DWITH_UTIL_MAIN $(CFLAGS) $(INCLUDES) $< -o $@
+${BUILD_ROOT}/gbb_utility: gbb_utility.cc
+ $(CXX) -DWITH_UTIL_MAIN $(CFLAGS) $< -o $@
-load_kernel_test: load_kernel_test.c $(LIBS)
+${BUILD_ROOT}/load_kernel_test: load_kernel_test.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-kernel_utility: kernel_utility.cc $(LIBS)
+${BUILD_ROOT}/kernel_utility: kernel_utility.cc $(LIBS)
$(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \
-o $@ $(LIBS) -lcrypto
-signature_digest_utility: signature_digest_utility.c $(LIBS)
+${BUILD_ROOT}/signature_digest_utility: signature_digest_utility.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-vbutil_kernel: vbutil_kernel.c $(LIBS)
+${BUILD_ROOT}/vbutil_kernel: vbutil_kernel.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-vbutil_key: vbutil_key.c $(LIBS)
+${BUILD_ROOT}/vbutil_key: vbutil_key.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-vbutil_keyblock: vbutil_keyblock.c $(LIBS)
+${BUILD_ROOT}/vbutil_keyblock: vbutil_keyblock.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-verify_data: verify_data.c $(LIBS)
+${BUILD_ROOT}/verify_data: verify_data.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-clean:
- rm -f $(TARGET_BINS)
install: $(TARGET_BINS)
mkdir -p $(DESTDIR)
cp -f $(TARGET_BINS) $(DESTDIR)
- chmod a+rx $(patsubst %,$(DESTDIR)/%,$(TARGET_BINS))
+ chmod a+rx $(patsubst %,$(DESTDIR)/%,$(TARGET_NAMES))
-%o : %c
- $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+-include ALL_DEPS
« no previous file with comments | « tests/run_vbutil_tests.sh ('k') | vboot_firmware/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698