summaryrefslogtreecommitdiff
path: root/util/cbfstool/tools/Makefile.inc
blob: 0ef79ea438bb05fb91e50366aa3d7426761abfa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

tobj ?= $(obj)/util/cbfstool/tools
tsrc ?= $(top)/util/cbfstool/tools

include $(tsrc)/lzma/Makefile.inc

COMMON = common.o compress.o $(LZMA_OBJ)

ifdef POST_EVALUATION

$(tobj)/cbfs-mkstage: $(tobj)/cbfs-mkstage.o $(patsubst %,$(tobj)/%,$(COMMON))
	printf "    HOSTCXX    $(subst $(obj)/,,$(@)) (link)\n"
	$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^

$(tobj)/cbfs-mkpayload: $(tobj)/cbfs-mkpayload.o $(patsubst %,$(tobj)/%,$(COMMON))
	printf "    HOSTCXX    $(subst $(obj)/,,$(@)) (link)\n"
	$(HOSTCXX) $(HOSTCFLAGS) -o $@ $^

$(tobj)/%.o: $(tsrc)/%.c
	printf "    HOSTCC     $(subst $(obj)/,,$(@))\n"
	$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<

endif