From 940db16d2e6ce69f769f790bf1def56978f0ac6c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:10 +0900 Subject: tools: convert makefiles to kbuild style Before this commit, makefiles under tools/ directory were implemented with their own way. This commit refactors them by using "hostprogs-y" variable. Several C sources have been added to wrap other C sources to simplify Makefile. For example, tools/crc32.c includes lib/crc32.c Signed-off-by: Masahiro Yamada --- config.mk | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 60e297ae9c..07afb350c2 100644 --- a/config.mk +++ b/config.mk @@ -58,7 +58,6 @@ PLATFORM_LDFLAGS = HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \ $(HOSTCPPFLAGS) -HOSTSTRIP = strip # # Mac OS X / Darwin's C preprocessor is Apple specific. It @@ -93,13 +92,6 @@ ifeq ($(HOSTOS),cygwin) HOSTCFLAGS += -ansi endif -# We build some files with extra pedantic flags to try to minimize things -# that won't build on some weird host compiler -- though there are lots of -# exceptions for files that aren't complaint. - -HOSTCFLAGS_NOPED = $(filter-out -pedantic,$(HOSTCFLAGS)) -HOSTCFLAGS += -pedantic - ######################################################################### # # Option checker, gcc version (courtesy linux kernel) to ensure @@ -213,24 +205,6 @@ CPPFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections endif -# TODO(sjg@chromium.org): Is this correct on Mac OS? - -# MXSImage needs LibSSL -ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) -HOSTLIBS += -lssl -lcrypto -# Add CONFIG_MXS into host CFLAGS, so we can check whether or not register -# the mxsimage support within tools/mxsimage.c . -HOSTCFLAGS += -DCONFIG_MXS -endif - -ifdef CONFIG_FIT_SIGNATURE -HOSTLIBS += -lssl -lcrypto - -# This affects include/image.h, but including the board config file -# is tricky, so manually define this options here. -HOSTCFLAGS += -DCONFIG_FIT_SIGNATURE -endif - ifneq ($(CONFIG_SYS_TEXT_BASE),) CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) endif @@ -341,7 +315,7 @@ endif ######################################################################### -export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \ +export HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE \ AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS -- cgit v1.2.1