coreboot-kgpe-d16/util/cbfstool/Makefile
Stefan Reinauer 3a5c27763f Cosmetic cbfstool update (trivial)
* remove some dead code
* fix indentation
* comment in some destructors and fix some other warnings 
* use HOSTCC instead of CC (not all the way cosmetic, but very simple)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4299 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-05-26 12:22:10 +00:00

42 lines
954 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
HOSTCC ?= gcc
HOSTCXX ?= g++
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))
$(HOSTCC) -o $@ $(patsubst %,$(obj)/%,$(OBJ))
tobj = $(obj)/tools
tsrc = $(shell pwd)/tools
include $(tsrc)/Makefile
$(obj)/%.o: %.c $(INC)
$(HOSTCC) $(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