From 2e200cde9a58a64f3df5f1c69dcdd57ef9452c3d Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 30 Oct 2012 14:02:45 -0700 Subject: cbfstool: Update LZMA encoder to LZMA SDK 9.12 This removes almost all C++ code (except the wrapper) Change-Id: I0f84070e3b6dc57c98d49a53150a140479b3221f Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/1799 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- util/cbfstool/Makefile | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) (limited to 'util/cbfstool/Makefile') diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index 813ba1b053..17b00a77f2 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -3,16 +3,15 @@ obj ?= $(shell pwd) HOSTCXX ?= g++ HOSTCC ?= gcc CFLAGS ?= -g -Wall -CXXFLAGS +=-DCOMPACT $(CFLAGS) -LDFLAGS ?= -g +CFLAGS += -D_7ZIP_ST BINARY:=$(obj)/cbfstool -COMMON:=common.o compress.o minilzma.o -COMMON+=LZMAEncoder.o LZInWindow.o -COMMON+=RangeCoderBit.o StreamUtils.o -COMMON+=OutBuffer.o Alloc.o CRC.o -COMMON+=cbfs-mkstage.o cbfs-mkpayload.o cbfstool.o +COMMON:=cbfstool.o common.o compress.o +COMMON+=cbfs-mkstage.o cbfs-mkpayload.o +# LZMA +COMMON+=lzma/lzma.o +COMMON+=lzma/C/LzFind.o lzma/C/LzmaDec.o lzma/C/LzmaEnc.o COMMON:=$(addprefix $(obj)/,$(COMMON)) @@ -21,23 +20,8 @@ all: dep $(BINARY) $(obj)/%.o: %.c $(HOSTCC) $(CFLAGS) -c -o $@ $< -$(obj)/%.o: lzma/%.cc - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< - -$(obj)/%.o: lzma/C/7zip/Compress/LZMA/%.cpp - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< - -$(obj)/%.o: lzma/C/7zip/Compress/LZ/%.cpp - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< - -$(obj)/%.o: lzma/C/7zip/Compress/RangeCoder/%.cpp - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< - -$(obj)/%.o: lzma/C/7zip/Common/%.cpp - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< - -$(obj)/%.o: lzma/C/Common/%.cpp - $(HOSTCXX) $(CXXFLAGS) -c -o $@ $< +$(obj)/%.o: %.cc + $(HOSTCXX) $(CFLAGS) -c -o $@ $< clean: rm -f $(COMMON) $(BINARY) @@ -46,14 +30,11 @@ tags: ctags *.[ch] $(obj)/cbfstool:$(COMMON) - $(HOSTCXX) $(LDFLAGS) -o $@ $^ + $(HOSTCXX) $(CFLAGS) -o $@ $^ dep: @$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies - @$(HOSTCC) $(CFLAGS) -MM lzma/C/7zip/Decompress/*.c >> .dependencies - @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Compress/*/*.cpp >> .dependencies - @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/7zip/Common/*.cpp >> .dependencies - @$(HOSTCXX) $(CXXFLAGS) -MM lzma/C/Common/*.cpp >> .dependencies - @$(HOSTCXX) $(CXXFLAGS) -MM lzma/*.cc >> .dependencies + @$(HOSTCC) $(CFLAGS) -MM lzma/*.cc >> .dependencies + @$(HOSTCC) $(CFLAGS) -MM lzma/C/*.c >> .dependencies -include .dependencies -- cgit v1.2.3