in order to integrate compression into lar, it needs some makefile splits to
keep the c++ compiler happy (lzma is c++ code and thus must be linked by a c++ compiler). The Makefiles are changed so lar is build with HOSTCC but linked with HOSTCXX (so the c++ library is picked up) Signed-off-by: PatrickGeorgi <patrick@georgi-clan.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@357 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
8da7c69e28
commit
baac49baf7
2 changed files with 18 additions and 9 deletions
|
|
@ -19,10 +19,9 @@
|
|||
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
##
|
||||
|
||||
# This stuff is always needed.
|
||||
# main utilities
|
||||
include util/dtc/Makefile
|
||||
include util/kconfig/Makefile
|
||||
include util/lar/Makefile
|
||||
include util/options/Makefile
|
||||
|
||||
# Parts used by LinuxBIOS.
|
||||
|
|
@ -32,3 +31,5 @@ include util/x86emu/Makefile
|
|||
include util/lzma/Makefile
|
||||
include util/nrv2b/Makefile
|
||||
|
||||
# LinuxBIOS archiver
|
||||
include util/lar/Makefile
|
||||
|
|
|
|||
|
|
@ -18,25 +18,33 @@
|
|||
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
|
||||
##
|
||||
|
||||
LZMA_OBJ := $(obj)/util/lzma/LZMAEncoder.o $(obj)/util/lzma/LZInWindow.o
|
||||
LZMA_OBJ += $(obj)/util/lzma/RangeCoderBit.o $(obj)/util/lzma/StreamUtils.o
|
||||
LZMA_OBJ += $(obj)/util/lzma/OutBuffer.o $(obj)/util/lzma/Alloc.o
|
||||
LZMA_OBJ += $(obj)/util/lzma/CRC.o
|
||||
LAROBJ := lar.o create.o extract.o list.o lib.o bootblock.o
|
||||
|
||||
SOURCE := lar.c create.c extract.c list.c lib.c bootblock.c
|
||||
LARDIR := lardir
|
||||
|
||||
ifeq ($(CONFIG_COMPRESSION_LZMA),y)
|
||||
COMPRESSOR := $(LZMA_OBJ) $(obj)/util/lzma/lzma-compress.o
|
||||
LARDIR += lzmadir
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_COMPRESSION_NRV2B),y)
|
||||
COMPRESSOR += $(obj)/util/nrv2b/nrv2b-compress.o
|
||||
LARDIR += nrv2bdir
|
||||
endif
|
||||
|
||||
$(obj)/util/lar/lar: $(patsubst %,$(src)/util/lar/%,$(SOURCE)) $(COMPRESSOR)
|
||||
LAROBJ_ABS := $(patsubst %,$(obj)/util/lar/%,$(LAROBJ))
|
||||
|
||||
lardir:
|
||||
$(Q)printf " BUILD LAR\n"
|
||||
$(Q)mkdir -p $(obj)/util/lar
|
||||
|
||||
$(obj)/util/lar/lar: $(CDIR) $(LAROBJ_ABS) $(COMPRESSOR)
|
||||
$(Q)printf " HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
|
||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^
|
||||
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $(ABS_OBJ) $(COMPRESSOR)
|
||||
|
||||
$(obj)/util/lar/%.o: $(src)/util/lar/%.c
|
||||
$(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
|
||||
$(Q)$(HOSTCC) $(HOSTCFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue