aa3f7ba36e
cbfstool was using a C++ wrapper around the C written LZMA functions. And a C wrapper around those C++ functions. Drop the mess and rewrite the functions to be all C. Change-Id: Ieb6645a42f19efcc857be323ed8bdfcd9f48ee7c Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/3010 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
36 lines
705 B
Makefile
36 lines
705 B
Makefile
obj ?= $(shell pwd)
|
|
|
|
HOSTCC ?= gcc
|
|
CFLAGS ?= -g -Wall -Werror
|
|
CFLAGS += -D_7ZIP_ST
|
|
|
|
BINARY:=$(obj)/cbfstool
|
|
|
|
COMMON:=cbfstool.o common.o cbfs_image.o compress.o fit.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))
|
|
|
|
all: dep $(BINARY)
|
|
|
|
$(obj)/%.o: %.c
|
|
$(HOSTCC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f $(COMMON) $(BINARY)
|
|
|
|
tags:
|
|
ctags *.[ch]
|
|
|
|
$(obj)/cbfstool:$(COMMON)
|
|
$(HOSTCC) $(CFLAGS) -o $@ $^
|
|
|
|
dep:
|
|
@$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies
|
|
@$(HOSTCC) $(CFLAGS) -MM lzma/*.c >> .dependencies
|
|
@$(HOSTCC) $(CFLAGS) -MM lzma/C/*.c >> .dependencies
|
|
|
|
-include .dependencies
|