summaryrefslogtreecommitdiff
path: root/util/cbfstool/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-10-30 14:02:45 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-12 18:35:52 +0100
commit2e200cde9a58a64f3df5f1c69dcdd57ef9452c3d (patch)
tree919607fc52473fbb54d587c2c4102f58328f13f2 /util/cbfstool/Makefile
parenta5b70676385d6b5da3d18f81042de4a1bb4cf0da (diff)
downloadcoreboot-2e200cde9a58a64f3df5f1c69dcdd57ef9452c3d.tar.xz
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 <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1799 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/cbfstool/Makefile')
-rw-r--r--util/cbfstool/Makefile41
1 files changed, 11 insertions, 30 deletions
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