2011-03-29 10:09:38 +07:00
|
|
|
DATA = $(word 1,$(wildcard ./data ../data))
|
|
|
|
include $(DATA)/Makefile.common
|
2011-03-29 10:23:59 +07:00
|
|
|
|
|
|
|
BINS := check_sanity make_kernel_patchfile apply_patchfile sandboxc.c
|
|
|
|
all: .settings .data $(BINS)
|
|
|
|
.data:
|
2011-03-29 10:09:38 +07:00
|
|
|
make -C $(DATA)
|
2011-03-29 10:23:59 +07:00
|
|
|
%.o: %.c
|
|
|
|
$(GCC) -c -o $@ $< -I$(DATA)
|
|
|
|
sandbox.o: sandbox.S
|
|
|
|
$(SDK_GCC) -c -o $@ $<
|
|
|
|
sandboxc.c: sandbox.o
|
|
|
|
xxd -i sandbox.o > sandboxc.c
|
|
|
|
|
2011-04-01 09:40:00 +07:00
|
|
|
check_sanity: check_sanity.o $(DATA)/libdata.a
|
2011-03-29 10:23:59 +07:00
|
|
|
$(GCC) -o $@ $^ $(DATA)/libdata.a
|
2011-04-01 09:40:00 +07:00
|
|
|
apply_patchfile: apply_patchfile.o $(DATA)/libdata.a
|
2011-03-29 10:23:59 +07:00
|
|
|
$(GCC) -o $@ $^ $(DATA)/libdata.a
|
2011-04-01 09:40:00 +07:00
|
|
|
make_kernel_patchfile: make_kernel_patchfile.o sandboxc.o $(DATA)/libdata.a
|
2011-03-29 10:23:59 +07:00
|
|
|
$(GCC) -o $@ $^ $(DATA)/libdata.a
|
|
|
|
|
2011-03-29 10:09:38 +07:00
|
|
|
clean:
|
2011-03-29 10:23:59 +07:00
|
|
|
rm -f $(BINS) *.o
|