From a6600709c183f1aa2ed56b3ca23dfc327550d83e Mon Sep 17 00:00:00 2001 From: stefanct Date: Thu, 7 Jan 2016 18:13:07 +0000 Subject: Add support for linking statically with CONFIG_STATIC=yes. This is loosly based on the following changes of chromiumos: - flashrom: Add default pkg-config definition. Change-Id: I28744af0fd2d2d0bcc4569a5fbef370321691267 - Fix FT2232 feature on static builds. Change-Id: I70d4a7bda573b64cb18429a21792455b018c4cba Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1912 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index e100b16..de8464d 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,11 @@ LDFLAGS += -L$(LIBS_BASE)/lib -Wl,-rpath -Wl,$(LIBS_BASE)/lib PKG_CONFIG_LIBDIR ?= $(LIBS_BASE)/lib/pkgconfig endif +ifeq ($(CONFIG_STATIC),yes) +PKG_CONFIG += --static +LDFLAGS += -static +endif + dummy_for_make_3_80:=$(shell printf "Build started on %s\n\n" "$$(date)" >$(BUILD_DETAILS_FILE)) debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(1) ; }' >&2; { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE)) ############################################################################### -- cgit v1.2.1