diff options
Diffstat (limited to 'util/cbfstool/Makefile')
-rw-r--r-- | util/cbfstool/Makefile | 41 |
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 |