coreboot-kgpe-d16/util/cbfstool/Makefile
Stefan Reinauer 2e200cde9a 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>
2012-11-12 18:35:52 +01:00

40 lines
748 B
Makefile

obj ?= $(shell pwd)
HOSTCXX ?= g++
HOSTCC ?= gcc
CFLAGS ?= -g -Wall
CFLAGS += -D_7ZIP_ST
BINARY:=$(obj)/cbfstool
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))
all: dep $(BINARY)
$(obj)/%.o: %.c
$(HOSTCC) $(CFLAGS) -c -o $@ $<
$(obj)/%.o: %.cc
$(HOSTCXX) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(COMMON) $(BINARY)
tags:
ctags *.[ch]
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(CFLAGS) -o $@ $^
dep:
@$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies
@$(HOSTCC) $(CFLAGS) -MM lzma/*.cc >> .dependencies
@$(HOSTCC) $(CFLAGS) -MM lzma/C/*.c >> .dependencies
-include .dependencies