Commit bf4ec9a0 authored by Ian Campbell's avatar Ian Campbell Committed by Siarhei Siamashka
Browse files

Makefile: Split out target tools rules



Target tools are those which are only useful on a target sunxi system (i.e.
which probe hardware etc).

Currently this is only sunxi-pio. At first I thought sunxi-nand-part might be
included, but I think that is useful on NAND images as well as actual devices.

This will allow for easier packaging, by letting packagers only include the
target tools when building for a suitable ARM architecture.
Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent f1cb74d8
...@@ -21,24 +21,31 @@ CFLAGS = -g -O0 -Wall -Wextra ...@@ -21,24 +21,31 @@ CFLAGS = -g -O0 -Wall -Wextra
CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L
CFLAGS += -Iinclude/ CFLAGS += -Iinclude/
TOOLS = sunxi-fexc bin2fex fex2bin sunxi-bootinfo sunxi-fel sunxi-pio # Tools useful on host and target
TOOLS = sunxi-fexc bin2fex fex2bin sunxi-bootinfo sunxi-fel
TOOLS += sunxi-nand-part TOOLS += sunxi-nand-part
# Tools which are only useful on the target
TARGET_TOOLS = sunxi-pio
MISC_TOOLS = phoenix_info MISC_TOOLS = phoenix_info
CROSS_COMPILE ?= arm-none-eabi- CROSS_COMPILE ?= arm-none-eabi-
.PHONY: all clean .PHONY: all clean tools target-tools
all: tools target-tools
all: $(TOOLS) tools: $(TOOLS)
target-tools: $(TARGET_TOOLS)
misc: $(MISC_TOOLS) misc: $(MISC_TOOLS)
clean: clean:
@rm -vf $(TOOLS) $(MISC_TOOLS) *.o *.elf *.sunxi *.bin *.nm *.orig @rm -vf $(TOOLS) $(TARGET_TOOLS) $(MISC_TOOLS) *.o *.elf *.sunxi *.bin *.nm *.orig
$(TOOLS): Makefile common.h $(TOOLS) $(TARGET_TOOLS): Makefile common.h
fex2bin bin2fex: sunxi-fexc fex2bin bin2fex: sunxi-fexc
ln -s $< $@ ln -s $< $@
...@@ -115,6 +122,6 @@ sunxi-meminfo: meminfo.c ...@@ -115,6 +122,6 @@ sunxi-meminfo: meminfo.c
$(CROSS_COMPILE)gcc -g -O0 -Wall -static -o $@ $^ $(CROSS_COMPILE)gcc -g -O0 -Wall -static -o $@ $^
.gitignore: Makefile .gitignore: Makefile
@for x in $(TOOLS) '*.o' '*.swp'; do \ @for x in $(TOOLS) $(TARGET_TOOLS) '*.o' '*.swp'; do \
echo "$$x"; \ echo "$$x"; \
done > $@ done > $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment