summaryrefslogtreecommitdiff
path: root/util/cbfstool/tools/Makefile
blob: bcecf466365739c29c45123f6cc06a31e74a663b (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
tobj ?= $(shell pwd)
tsrc ?= $(shell pwd)

TARGETS += $(tobj)/rom-mkstage $(tobj)/rom-mkpayload

tools: $(tobj)/rom-mkstage $(tobj)/rom-mkpayload

include $(tsrc)/lzma/Makefile

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

$(tobj)/rom-mkstage: $(tobj)/rom-mkstage.o $(patsubst %,$(tobj)/%,$(COMMON))
	$(CXX) $(CFLAGS) -o $@ $^

$(tobj)/rom-mkpayload: $(tobj)/rom-mkpayload.o $(patsubst %,$(tobj)/%,$(COMMON))
	$(CXX) $(CFLAGS) -o $@ $^

$(tobj)/%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

tools-clean:
	rm -f $(tobj)/rom-mkpayload.o $(tobj)/rom-mkstage.o $(patsubst %,$(tobj)/%,$(COMMON))
	rm -f $(tobj)/rom-mkpayload $(tobj)/rom-mkstage