Add a makefile target to build all platforms.

This commit is contained in:
Gareth McMullin 2015-03-02 22:20:25 -08:00
parent 3e466f2d23
commit 87b8f330f0
1 changed files with 15 additions and 1 deletions

View File

@ -47,10 +47,24 @@ OBJ = $(SRC:.c=.o)
blackmagic: $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
.PHONY: clean host_clean
.PHONY: clean host_clean all_platforms
clean: host_clean
-$(RM) *.o *.d *~ blackmagic $(HOSTFILES)
-$(RM) platforms/*/*.o platforms/*/*.d mapfile
all_platforms:
for i in platforms/*/Makefile.inc ; do \
export DIRNAME=`dirname $$i` ;\
export PROBE_HOST=`basename $$DIRNAME` ;\
export CFLAGS=-Werror ;\
echo $$PROBE_HOST ;\
$(MAKE) clean ;\
$(MAKE) ;\
if [ -f blackmagic.bin ]; then \
mv blackmagic.bin blackmagic-$$PROBE_HOST.bin ;\
fi ;\
done
-include *.d