coreboot-kgpe-d16/util/cbfstool/Makefile
Ronald G. Minnich 5a1af7b877 There was a missing addition of the size of the .notes.pinfo
section header which could lead to corrupted malloc arena. 

Also, make cbfstool always build with debugging on. Performance
is not an issue here. Don't strip it either. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4641 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-09-17 15:35:08 +00:00

52 lines
1,002 B
Makefile

obj ?= $(shell pwd)
HOSTCXX ?= g++
HOSTCC ?= gcc
CFLAGS ?= -g
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:=$(addprefix $(obj)/,$(COMMON))
$(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 $@ $<
all: $(BINARY)
clean:
rm -f $(COMMON) $(BINARY)
tags:
ctags *.[ch]
CXXFLAGS=-DCOMPACT -g
CFLAGS=-g
LDFLAGS=-g
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(LDFLAGS) -o $@ $^