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

Unified Diff: vboot_firmware/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 | « utility/Makefile ('k') | vfirmware/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vboot_firmware/Makefile
diff --git a/vboot_firmware/Makefile b/vboot_firmware/Makefile
index efdb4db4d1f3edc1aa0ab7076d53261738b65866..2440487009e33fbfd9de1c7248229c4078e877cf 100644
--- a/vboot_firmware/Makefile
+++ b/vboot_firmware/Makefile
@@ -2,17 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-LIBNAME = vboot_fw.a
-
-CC ?= gcc
-CFLAGS = -Wall -DNDEBUG -O3 -Werror
-
FWTOP := $(shell pwd)
LIBDIR = $(FWTOP)/lib
STUBDIR = $(FWTOP)/stub
TESTDIR = $(FWTOP)/linktest
+BUILD_ROOT := ${BUILD}/$(shell basename ${FWTOP})
-INC = \
+INCLUDES = \
-I$(FWTOP)/include \
-I$(LIBDIR)/include \
-I$(LIBDIR)/cgptlib/include \
@@ -40,32 +36,20 @@ LIB_SRCS = \
./lib/vboot_firmware.c \
./lib/vboot_kernel.c
-LIB_OBJS = $(LIB_SRCS:%.c=%.o)
-
-# find ./stub -iname '*.c' | sort
STUB_SRCS = \
./stub/boot_device_stub.c \
./stub/load_firmware_stub.c \
./stub/tlcl.c \
./stub/utility_stub.c
-STUB_OBJS = $(STUB_SRCS:%.c=%.o)
+ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS}
+test : $(FWLIB)
+ $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \
+ $(TESTDIR)/main.c $(FWLIB)
-test : $(LIBNAME)
- $(CC) $(CFLAGS) $(INC) -o $(TESTDIR)/a.out $(TESTDIR)/main.c $(LIBNAME)
+include ../common.mk
-$(LIBNAME) : $(LIB_OBJS) $(STUB_OBJS)
+$(FWLIB) : $(ALL_OBJS)
rm -f $@
ar qc $@ $^
-
-%o : %c
- $(CC) $(CFLAGS) $(INC) -c -o $@ $<
-
-clean: FORCE
- rm -f $(LIBNAME) $(LIB_OBJS) $(STUB_OBJS) $(TESTDIR)/a.out
-
-FORCE:
-
-
-.PHONY: FORCE
« no previous file with comments | « utility/Makefile ('k') | vfirmware/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698