diff --git a/Makefile.include b/Makefile.include index 37322751d..a0669c9f2 100644 --- a/Makefile.include +++ b/Makefile.include @@ -1,5 +1,11 @@ # -*- makefile -*- +ifndef BOARD +default: allboards +else +default: all +endif + CROSS_COMPILE := arm-linux- LINKERSCRIPT := $(MC1322X)/mc1322x.lds @@ -118,14 +124,6 @@ clobber \ mrproper \ distclean: clean -#.DEFAULT_GOAL := all - -ifndef BOARD -.DEFAULT_GOAL := allboards -else -.DEFAULT_GOAL := all -endif - all: $(OBJDIR)/board.h for target in $(TARGETS); do make $$target\_$(BOARD).bin; done for target in $(TARGETS_WITH_ROM_VARS); do make TARGET_ROM_VARS=1 $$target\_$(BOARD).bin; done diff --git a/tests/Makefile b/tests/Makefile index 652ae8387..bcce0cce8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -22,13 +22,9 @@ TARGETS_WITH_ROM_VARS := nvm-read nvm-write romimg flasher \ # you shouldn't need to edit anything below here # ################################################## -need := 3.81 -ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) \ - $(need)))) - -ifdef $(need) -$(error You need to use version 3.81 of Make or later) -endif +# This Makefile includes the default rule at the top +# it needs to be included first +-include $(MC1322X)/Makefile.include # this rule will become the default_goal if # $(MC1322X)/Makefile.include doesn't exist it will try to update the @@ -39,7 +35,7 @@ submodule: if [ ! -d $(MC1322X) ] ; then echo "*** cannot find MC1322X directory $(MC1322X)" ; exit 2; fi $(MAKE) --include $(MC1322X)/Makefile.include +