summaryrefslogtreecommitdiff
path: root/util/romtool/tools/Makefile
blob: f5f0df8addfaead08c941be5eeacd863a48f3b76 (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 $(tobj)/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