changeset 3295:6b7a7b233925 default tip

makefile: Allow PORTS with level1/2 mix https://sourceforge.net/p/nitros9/feature-requests/10/
author Tormod Volden <debian.tormod@gmail.com>
date Tue, 19 Apr 2022 18:12:17 +0200
parents 6b012cf1b400
children
files makefile
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/makefile	Fri Apr 15 16:09:38 2022 +0200
+++ b/makefile	Tue Apr 19 18:12:17 2022 +0200
@@ -9,18 +9,9 @@
 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
-ifneq (,$(findstring mc09l2,$(PORTS)))
-dirs    += $(LEVEL2)
-else
-dirs    += $(LEVEL1)
-endif
-endif
+dirs = $(NOSLIB)
+dirs += $(filter $(foreach p,$(PORTS),$(LEVEL1)/$(p) $(LEVEL2)/$(p)),$(wildcard $(LEVEL1)/* $(LEVEL2)/*))
 endif
 
 # Make all components