view level1/cmds/makefile @ 2758:e4a0f58a5f9b

Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded. To fix this the code needed to set the envirornment variable that is in the rules.mak is now in the makefile(s) right before the include for the rules.mak file. This should fix the problem for those who do not have the NITROS9DIR envirornment variable preset.
author drencor-xeen
date Mon, 14 Jan 2013 14:37:46 -0600
parents fd6a34af179a
children 1addfd8c9d5f
line wrap: on
line source

PORT = 
ifndef  NITROS9DIR
NITROS9DIR      = $(HOME)/nitros9
endif
include $(NITROS9DIR)/rules.mak

vpath %.asm $(3RDPARTY)/packages/basic09

DEPENDS		= ./makefile

BASIC09FILES	= runb.asm gfx.asm inkey.asm syscall.asm
CMDS		= asm attr backup binex build cmp cobbler copy cputype \
		date dcheck debug ded deiniz del deldir devs dir dirsort disasm \
		display dmode dsave dump echo edit error exbin format \
		free grfdrv help ident iniz irqs link list load login makdir \
		megaread mdir merge mfree mpi os9gen padrom park printerr procs prompt pwd pxd \
		rename runb save setime shellplus shell_21 sleep \
		tee tmode touch tsmon tuneport unlink verify xmode

DRAGONCMDS	= asm attr backup binex build cmp cobbler_dragon copy cputype \
		date dcheck debug ded deiniz del deldir devs dir dirsort disasm \
		display dmode dsave dump echo edit error exbin format \
		free grfdrv help ident iniz irqs link list load login makdir \
		megaread mdir merge mfree mpi os9gen padrom park printerr procs prompt pwd pxd \
		rename runb save setime shellplus shell_21 sleep \
		tee tmode touch tsmon tuneport unlink verify xmode

DRAGON525CMDS	= asm attr backup binex build cmp cobbler copy date del deldir \
		dir display dmode dsave dump echo exbin format free ident link list \
		load login makdir mdir merge mfree os9gen printerr procs pwd pxd rename \
		save setime shell_21 sleep tee tmode tsmon unlink verify xmode acia51 dmode        

DRAGON525CMDS2	= cputype dcheck debug ded deiniz devs dirsort disasm edit error \
		grfdrv help iniz irqs megaread mpi os9gen padrom park printerr prompt \
		runb shellplus shell_21 touch tuneport 


SUBS		= gfx inkey syscall
ALLOBJS		= $(CMDS) $(DRAGONCMDS) $(SUBS)

all:	$(ALLOBJS)

alldragon: $(DRAGONCMDS) $(SUBS)


pwd:	pd.asm
	$(AS) $(AFLAGS) $< $(ASOUT)$@ -aPWD=1

xmode:	xmode.asm
	$(AS) $(AFLAGS) $< $(ASOUT)$@ -aXMODE=1

tmode:	xmode.asm
	$(AS) $(AFLAGS) $< $(ASOUT)$@ -aTMODE=1

pxd:	pd.asm
	$(AS) $(AFLAGS) $< $(ASOUT)$@ -aPXD=1
	
cobbler_dragon: cobbler.asm
	$(AS) $(AFLAGS) $< $(ASOUT)cobbler_dragon -aDRAGON=1

clean:
	$(RM) $(ALLOBJS)

identify:
	$(IDENT_SHORT) $(ALLOBJS)

showallobjs:
	@$(ECHO) $(ALLOBJS)

showcocoobjs:
	@$(ECHO) $(CMDS) $(SUBS)

showdragonobjs:
	@$(ECHO) $(CMDS) $(DRAGONCMDS)

showdragon525objs:
	@$(ECHO) $(DRAGON525CMDS) $(SUBS)

showdragon525objs2:
	@$(ECHO) $(DRAGON525CMDS2) $(SUBS)