From e6cc67b07a8cf25a3b439febcdfdce37e64297ab Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 4 Apr 2009 18:24:21 +0000 Subject: build romtool in mainboard target directory. Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4067 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/romtool/tools/Makefile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'util/romtool/tools/Makefile') diff --git a/util/romtool/tools/Makefile b/util/romtool/tools/Makefile index 1d1912a4f7..e711f500ab 100644 --- a/util/romtool/tools/Makefile +++ b/util/romtool/tools/Makefile @@ -1,27 +1,25 @@ +obj ?= $(shell pwd) + CC=gcc -CFLAGS=-Wall -Werror -g +CFLAGS=-Wall -W -Werror -g -LZMA_OBJ := lzma/LZMAEncoder.o lzma/LZInWindow.o -LZMA_OBJ += lzma/RangeCoderBit.o lzma/StreamUtils.o -LZMA_OBJ += lzma/OutBuffer.o lzma/Alloc.o -LZMA_OBJ += lzma/CRC.o -LZMA_OBJ += lzma/lzma-compress.o +all: rom-mkstage rom-mkpayload -COMMON= common.o compress.o $(LZMA_OBJ) +include lzma/Makefile -all: rom-mkstage rom-mkpayload +COMMON= common.o compress.o $(LZMA_OBJ) -rom-mkstage: rom-mkstage.o $(COMMON) - $(CXX) -g -o $@ rom-mkstage.o $(COMMON) -rom-mkpayload: rom-mkpayload.o $(COMMON) - $(CXX) -o $@ rom-mkpayload.o $(COMMON) +$(obj)/rom-mkstage: $(obj)/rom-mkstage.o $(patsubst %,$(obj)/%,$(COMMON)) + $(CXX) -g -o $@ $(obj)/rom-mkstage.o $(patsubst %,$(obj)/%,$(COMMON)) -include lzma/Makefile +$(obj)/rom-mkpayload: $(obj)/rom-mkpayload.o $(patsubst %,$(obj)/%,$(COMMON)) + $(CXX) -o $@ $(obj)/rom-mkpayload.o $(patsubst %,$(obj)/%,$(COMMON)) -%.o: %.c +$(obj)/%.o: %.c $(CC) -Wall -Werror -g -c -o $@ $< clean: @ rm -f rom-mkpayload.o rom-mkstage.o $(COMMON) @ rm -f rom-mkpayload rom-mkstage + -- cgit v1.2.3