summaryrefslogtreecommitdiff
path: root/util/romtool/tools/Makefile
blob: e711f500abb1d7e550e16691c2b8459f33b26609 (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
obj ?= $(shell pwd)

CC=gcc
CFLAGS=-Wall -W -Werror -g

all: rom-mkstage rom-mkpayload

include lzma/Makefile

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


$(obj)/rom-mkstage: $(obj)/rom-mkstage.o $(patsubst %,$(obj)/%,$(COMMON))
	$(CXX) -g -o $@ $(obj)/rom-mkstage.o $(patsubst %,$(obj)/%,$(COMMON))

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

$(obj)/%.o: %.c
	$(CC) -Wall -Werror -g -c -o $@ $<

clean:
	@ rm -f rom-mkpayload.o rom-mkstage.o $(COMMON)
	@ rm -f rom-mkpayload rom-mkstage