view makefile @ 3267:024ad1d926fd

Get gfx2 to build from cmds folders Now that gfx2.asm needs to include coco3vtio.d the latter needs to be built first and be accessed from the port-specific defs folder. OTOH the one built in 3rd-party/packages/basic09 is built only later during a full build. (All the different defs folders and .d files still puzzle me.) Also updated coco3fpga/defs/makefile to be based on the coco3 one. The mc09l2 port doesn't need gfx and gfx2. Note for later: This whole build of basic09 components from the 3rdparty folder during the ports builds is not very nice. At a minimum we should try to limit the extra --includedir to the few commands needing it.
author Tormod Volden <debian.tormod@gmail.com>
date Wed, 17 Jul 2019 01:14:55 +0200
parents ab1e1bca132b
children 6b7a7b233925
line wrap: on
line source


ifndef NITROS9DIR
NITROS9DIR = $(PWD)
endif

export NITROS9DIR
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
ifneq (,$(findstring mc09l2,$(PORTS)))
dirs    += $(LEVEL2)
else
dirs    += $(LEVEL1)
endif
endif
endif

# Make all components
all:
	@$(ECHO) "**************************************************"
	@$(ECHO) "*                                                *"
	@$(ECHO) "*              THE NITROS-9 PROJECT              *"
	@$(ECHO) "*                                                *"
	@$(ECHO) "**************************************************"
	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :

# Clean all components
clean:
	$(RM) nitros9project.zip
	$(RM) $(DSKDIR)/*.dsk $(DSKDIR)/*.DSK $(DSKDIR)/*.img
	$(RM) $(DSKDIR)/ReadMe
	$(RM) $(DSKDIR)/index.html $(DSKDIR)/index.shtml
	$(foreach dir,$(dirs),$(MAKE) -C $(dir) clean &&) :

# Make DSK images
dsk:	all
	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dsk &&) :

# Copy DSK images
dskcopy:	all
	mkdir -p $(DSKDIR)
	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskcopy &&) :
	$(MKDSKINDEX) $(DSKDIR) > $(DSKDIR)/index.html

# Clean DSK images
dskclean:
	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskclean &&) :

info:
	@$(foreach dir,$(dirs), $(MAKE) --no-print-directory -C $(dir) info &&) :

# This section is to do the nightly build and upload 
# to sourceforge.net you must set the environment
# variable SOURCEUSER to the userid you have for sourceforge.net
# The "burst" script is found in the scripts folder and must
# on your ssh account at sourceforge.net
ifdef	SOURCEUSER
nightly: clean dskcopy
	$(MAKE) info > $(DSKDIR)/ReadMe
	$(ARCHIVE) nitros9project $(DSKDIR)/*
	scp nitros9project.zip $(SOURCEUSER),nitros9@web.sourceforge.net:/home/project-web/nitros9/htdocs/nitros9project-$(shell date +%Y%m%d).zip 
	ssh $(SOURCEUSER),nitros9@shell.sourceforge.net create
	ssh $(SOURCEUSER),nitros9@shell.sourceforge.net "./burst nitros9project $(shell date +%Y%m%d)"
else
nightly:
	@$(ECHO) ""
	@$(ECHO) ""
	@$(ECHO) "You need to set the SOURCEUSER variable"
	@$(ECHO) "You may wish to refer to the nightly"
	@$(ECHO) "section of the makefile."
endif