2011-03-29 10:09:38 +07:00
|
|
|
DATA = $(word 1,$(wildcard ./data ../data))
|
2011-05-03 02:10:23 +07:00
|
|
|
CFLAGS += -I$(DATA)
|
2011-03-29 10:09:38 +07:00
|
|
|
include $(DATA)/Makefile.common
|
2011-03-29 10:23:59 +07:00
|
|
|
|
2011-05-03 02:12:05 +07:00
|
|
|
BINS := $(OUTDIR)/check_sanity $(OUTDIR)/make_kernel_patchfile $(OUTDIR)/apply_patchfile $(OUTDIR)/dump_range sandboxc.c
|
2011-05-03 02:10:23 +07:00
|
|
|
|
|
|
|
all: .data $(OUTDIR) $(BINS)
|
2011-05-03 02:12:05 +07:00
|
|
|
|
2011-03-29 10:23:59 +07:00
|
|
|
.data:
|
2011-03-29 10:09:38 +07:00
|
|
|
make -C $(DATA)
|
2011-05-03 02:10:23 +07:00
|
|
|
$(OUTDIR):
|
|
|
|
mkdir $(OUTDIR)
|
|
|
|
|
2011-03-29 10:23:59 +07:00
|
|
|
sandbox.o: sandbox.S
|
2011-05-03 02:12:05 +07:00
|
|
|
$(SDK_GCC) -arch armv6 -c -o $@ $<
|
2011-03-29 10:23:59 +07:00
|
|
|
sandboxc.c: sandbox.o
|
|
|
|
xxd -i sandbox.o > sandboxc.c
|
|
|
|
|
2011-05-03 02:10:23 +07:00
|
|
|
$(OUTDIR)/check_sanity: $(OUTDIR)/check_sanity.o $(DATA)/$(OUTDIR)/libdata.a
|
|
|
|
$(GCC) -o $@ $^
|
|
|
|
$(OUTDIR)/apply_patchfile: $(OUTDIR)/apply_patchfile.o $(DATA)/$(OUTDIR)/libdata.a
|
|
|
|
$(GCC) -o $@ $^
|
|
|
|
$(OUTDIR)/make_kernel_patchfile: $(OUTDIR)/make_kernel_patchfile.o $(OUTDIR)/sandboxc.o $(DATA)/$(OUTDIR)/libdata.a
|
|
|
|
$(GCC) -o $@ $^
|
2011-05-03 02:12:05 +07:00
|
|
|
$(OUTDIR)/dump_range: $(OUTDIR)/dump_range.o $(DATA)/$(OUTDIR)/libdata.a
|
|
|
|
$(GCC) -o $@ $^
|
2011-03-29 10:23:59 +07:00
|
|
|
|
2011-05-03 02:10:23 +07:00
|
|
|
clean: .clean
|
|
|
|
rm -f sandbox.o sandboxc.c
|