coreboot-kgpe-d16/util/romtool/Makefile
Stefan Reinauer e6cc67b07a build romtool in mainboard target directory.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4067 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-04-04 18:24:21 +00:00

38 lines
938 B
Makefile

#
#
#
obj ?= $(shell pwd)
COMMANDS=create.o bootblock.o delete.o add.o print.o resize.o
OBJ=$(COMMANDS) romtool.o util.o fs.o
CC=gcc
CFLAGS=-g -Wall -W #-Werror
H=romtool.h
DESTDIR ?= /usr/local/bin
all: $(obj)/romtool $(obj)/tools/rom-mkpayload $(obj)/tools/rom-mkstage
$(obj)/romtool: $(patsubst %,$(obj)/%,$(OBJ))
$(CC) -o $@ $(patsubst %,$(obj)/%,$(OBJ))
$(obj)/tools/rom-mkpayload $(obj)/tools/rom-mkstage:
$(MAKE) -C tools/ obj=$(obj)/tools $(patsubst tools/%, %, $@)
$(obj)/%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
install: $(obj)/romtool $(obj)/tools/rom-mkpayload $(obj)/tools/rom-mkstage
@ install -d $(DESTDIR)
@ install -m 0755 $(obj)/romtool $(DESTDIR)/romtool
@ install -m 0755 $(obj)/tools/rom-mkstage $(DESTDIR)/rom-mkstage
@ install -m 0755 $(obj)/tools/rom-mkpayload $(DESTDIR)/rom-mkpayload
tags:
ctags *.[ch] */*.[ch]
clean:
$(MAKE) -C tools/ clean
rm -f $(patsubst %,$(obj)/%,$(OBJ)) $(obj)/romtool