# HG changeset patch # User Tormod Volden # Date 1389483916 -3600 # Node ID 14b4f2791bb35025b22aa5d85b6c9a2236efa201 # Parent 635275f4498a547652b14762be0cd499aaf3e7ce Allow selection of ports to build using PORTS variable When building from the top level directory, a subset of ports can be specified, some examples: make PORTS=atari make PORTS="d64 tano dalpha" make dsk PORTS=coco3_6309 Note that ports from level2 (coco3 or coco3_6309) can not be specified together with ports from level1. diff -r 635275f4498a -r 14b4f2791bb3 level1/makefile --- a/level1/makefile Sat Jan 11 22:57:41 2014 +0100 +++ b/level1/makefile Sun Jan 12 00:45:16 2014 +0100 @@ -1,6 +1,9 @@ include $(NITROS9DIR)/rules.mak dirs = coco1 deluxe coco2 coco2b tano d64 dalpha atari +ifdef PORTS +dirs = $(PORTS) +endif # Make all components all: diff -r 635275f4498a -r 14b4f2791bb3 level2/makefile --- a/level2/makefile Sat Jan 11 22:57:41 2014 +0100 +++ b/level2/makefile Sun Jan 12 00:45:16 2014 +0100 @@ -1,6 +1,9 @@ include $(NITROS9DIR)/rules.mak dirs = coco3 coco3_6309 +ifdef PORTS +dirs = $(PORTS) +endif # Make all components all: diff -r 635275f4498a -r 14b4f2791bb3 makefile --- a/makefile Sat Jan 11 22:57:41 2014 +0100 +++ b/makefile Sun Jan 12 00:45:16 2014 +0100 @@ -8,6 +8,17 @@ include rules.mak dirs = $(NOSLIB) $(LEVEL1) $(LEVEL2) $(LEVEL3) $(3RDPARTY) + +# Allow the user to specify a selection of ports to build +# All selected ports must be of the same level +ifdef PORTS +dirs = $(NOSLIB) +ifneq (,$(findstring coco3,$(PORTS))) +dirs += $(LEVEL2) +else +dirs += $(LEVEL1) +endif +endif # Make all components all: