ios-kernel-patch/Makefile

27 lines
749 B
Makefile
Raw Normal View History

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:10:23 +07:00
BINS := $(OUTDIR)/check_sanity $(OUTDIR)/make_kernel_patchfile $(OUTDIR)/apply_patchfile sandboxc.c
all: .data $(OUTDIR) $(BINS)
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
$(SDK_GCC) -c -o $@ $<
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-03-29 10:23:59 +07:00
2011-05-03 02:10:23 +07:00
clean: .clean
rm -f sandbox.o sandboxc.c