coreboot-kgpe-d16/util/cbfstool/Makefile
Myles Watson feaaedc1cf This patch adds
cbfstool extract [FILE] [NAME]

It also factors out the csize calculation in rom_add, and fixes rom_delete so
that it can handle deleting the last entry.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4144 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-04-20 21:38:11 +00:00

40 lines
925 B
Makefile

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