summaryrefslogtreecommitdiff
path: root/util/cbfstool/Makefile.inc
blob: 806088a83d1fbf10588b610338a7035666a16bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

ifdef POST_EVALUATION

cbfsobj :=
# commands
cbfsobj += create.o
cbfsobj += bootblock.o
cbfsobj += delete.o
cbfsobj += extract.o 
cbfsobj += add.o 
cbfsobj += print.o
cbfsobj += resize.o
# main tool
cbfsobj += cbfstool.o
cbfsobj += util.o
cbfsobj += fs.o

cbfsinc := cbfstool.h cbfs.h

$(obj)/util/cbfstool:
	$(Q)mkdir -p $@
	$(Q)mkdir -p $@/tools/lzma

$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/%.c
	$(Q)printf "    HOSTCC     $(subst $(obj)/,,$(@))\n"
	$(Q)$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<

$(obj)/util/cbfstool/cbfstool: $(obj)/util/cbfstool $(obj)/util/cbfstool/tools/cbfs-mkpayload $(obj)/util/cbfstool/tools/cbfs-mkstage $(addprefix $(obj)/util/cbfstool/,$(cbfsobj))
	$(Q)printf "    HOSTCC     $(subst $(obj)/,,$(@)) (link)\n"
	$(Q)$(HOSTCC) -o $@ $(addprefix $(obj)/util/cbfstool/,$(cbfsobj))

endif

include $(top)/util/cbfstool/tools/Makefile.inc