ios-kernel-patch/Makefile

44 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2012-02-19 01:26:06 +07:00
DATA := $(word 1,$(wildcard ./data ../data))
EXTRA_DEPS := $(wildcard $(DATA)/*.h $(DATA)/*/*.h)
2011-06-27 09:11:21 +07:00
override CFLAGS += -I$(DATA)
2011-03-29 10:09:38 +07:00
include $(DATA)/Makefile.common
2011-03-29 10:23:59 +07:00
BINS := $(OUTDIR)/check_sanity $(OUTDIR)/make_kernel_patchfile $(OUTDIR)/apply_patchfile $(OUTDIR)/dump $(OUTDIR)/nm $(OUTDIR)/extract_syms $(OUTDIR)/unpack sandboxc-armv6.c sandboxc-armv7.c
2012-09-30 11:36:24 +07:00
ifneq "$(GXX)" ""
BINS += $(OUTDIR)/grapher
endif
2011-05-03 02:10:23 +07:00
all: .data $(OUTDIR) $(BINS)
2011-05-03 02:12:05 +07:00
2011-05-03 02:10:23 +07:00
$(OUTDIR):
mkdir $(OUTDIR)
2011-06-27 09:11:21 +07:00
sandbox-armv6.o: sandbox.S
2011-05-03 02:12:05 +07:00
$(SDK_GCC) -arch armv6 -c -o $@ $<
2011-06-27 09:11:21 +07:00
sandbox-armv7.o: sandbox.S
$(SDK_GCC) -arch armv7 -c -o $@ $<
sandboxc-%.c: sandbox-%.o
xxd -i $< > $@
2011-03-29 10:23:59 +07:00
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 $@ $^
2011-06-27 09:11:21 +07:00
$(OUTDIR)/make_kernel_patchfile: $(OUTDIR)/make_kernel_patchfile.o $(OUTDIR)/sandboxc-armv6.o $(OUTDIR)/sandboxc-armv7.o $(DATA)/$(OUTDIR)/libdata.a
2011-05-03 02:10:23 +07:00
$(GCC) -o $@ $^
2011-06-27 09:11:21 +07:00
$(OUTDIR)/dump: $(OUTDIR)/dump.o $(DATA)/$(OUTDIR)/libdata.a
2011-05-03 02:12:05 +07:00
$(GCC) -o $@ $^
2011-06-05 05:17:21 +07:00
$(OUTDIR)/nm: $(OUTDIR)/nm.o $(DATA)/$(OUTDIR)/libdata.a
2011-05-15 06:56:44 +07:00
$(GCC) -o $@ $^
$(OUTDIR)/extract_syms: $(OUTDIR)/extract_syms.o $(DATA)/$(OUTDIR)/libdata.a
$(GCC) -o $@ $^
2011-06-05 06:12:56 +07:00
$(OUTDIR)/grapher: $(OUTDIR)/grapher.o $(DATA)/$(OUTDIR)/libdata.a
$(GXX) -o $@ $^ -O3
$(OUTDIR)/unpack: $(OUTDIR)/unpack.o $(DATA)/$(OUTDIR)/libdata.a
2011-06-27 09:11:21 +07:00
$(GCC) -o $@ $^ -O3
2011-07-13 05:13:35 +07:00
$(OUTDIR)/codesign_allocate: $(OUTDIR)/codesign_allocate.o
$(GCC) -o $@ $^ -O3
2011-03-29 10:23:59 +07:00
2011-05-03 02:10:23 +07:00
clean: .clean
2011-06-27 09:11:21 +07:00
rm -f sandboxc-{armv6,armv7}.c sandbox-{armv6,armv7}.o