Skip to content

Commit

Permalink
Add a quick master makefile to make testing faster
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishcoleman committed Jul 13, 2017
1 parent aa6c34a commit 7431e0a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 11 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# A master make file - currently just to help with build-depends and clean
#

SUBDIRS += debian/
SUBDIRS += linux/

# The boards/* subdirs should probably be controlled from a boards/Makefile
# - maybe later

SUBDIRS += boards/common-firmware-armbian/
SUBDIRS += boards/common-firmware-raspbian/

QEMUDIRS += boards/qemu_armhf/
QEMUDIRS += boards/qemu_i386/
SUBDIRS += $(QEMUDIRS)

BOARDDIRS += boards/raspberrypi2/
BOARDDIRS += boards/sun8i-h2-plus-orangepi-zero/
BOARDDIRS += boards/sun8i-h3-orangepi-lite/
BOARDDIRS += boards/sun8i-v3s-licheepi-zero/
SUBDIRS += $(BOARDDIRS)

all:
$(error This Makefile currently has no default build target)

build-depends clean reallyclean:
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ &&) true

image:
$(foreach dir,$(BOARDDIRS),$(MAKE) -C $(dir) $@ &&) true
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ Building the image
Multiple board targets are supported, but they all use the same basic
process. The following commands will build for the Orange Pi Zero:

make -C debian build-depends
make -C boards/sun8i-h2-plus-orangepi-zero build-depends
make build-depends

make -C boards/sun8i-h2-plus-orangepi-zero image

Expand All @@ -49,12 +48,11 @@ One simple answer is to completely delete your repository and do a new
clone from upstream, however that can be a little excessive. The following
commands will remove all the build artifacts:

make -C debian clean reallyclean
make -C boards/sun8i-h2-plus-orangepi-zero clean reallyclean
make clean reallyclean

The "clean" target removes some files one-by-one from the build dir, wheras
the "reallyclean" target just nukes the whole build dir - so this is kind of
a belt-and-suspender approach.
The "clean" target removes some files one-by-one from the build dir,
wheras the "reallyclean" target just nukes each build dir - so this is
kind of a belt-and-suspender approach.


Using the image
Expand Down Expand Up @@ -121,8 +119,7 @@ Single Board Computers that are expected to be used - and it uses exactly
the same binaries that would be used on those. However, it is usually
a slower emulator.

make -C debian build-depends
make -C boards/qemu_armhf build-depends
make build-depends

make -C boards/qemu_armhf test

Expand All @@ -137,8 +134,7 @@ While this is not the expected architecture for most physical hardware,
it is a much faster emulation. Additionally, all the debian packages,
configuration and customisation is the same as the armhf architecture.

make -C debian build-depends
make -C boards/qemu_i386 build-depends
make build-depends

make -C boards/qemu_i386 test

Expand Down

0 comments on commit 7431e0a

Please sign in to comment.