view level2/makefile @ 1153:238d270bcb77

DEFS added to list of dirs, left of inadvertently
author boisy
date Wed, 30 Apr 2003 15:18:24 +0000
parents 061823503a2f
children a3d0ac951684
line wrap: on
line source

include ../Makefile.rules

RELEASE		= os9l2v030101
BOOTFILE	= BOOTFILES/bootfile_vdg
KERNEL		= BOOTFILES/kernel_stock
DIRS		= CMDS MODULES DEFS SYS BOOTFILES

CMDS		= $(shell $(CD) CMDS; make showobjs)
MODULES		= $(shell $(CD) MODULES; make showcopyobjs)
DEFS		= $(shell $(CD) DEFS; make showobjs)
SYSBIN		= $(shell $(CD) SYS; make showbinobjs)
SYSTEXT		= $(shell $(CD) SYS; make showtextobjs)
ROOTFILES	= startup
SYSGO		= cc3go

PACKAGENAME	= $(RELEASE).zip
DSK1		= $(RELEASE)_ds40_1.dsk
DSK2		= $(RELEASE)_ds40_2.dsk
TESTDSK		= test.dsk


# Make all components
all:
	@$(ECHO) "*********************************************"
	@$(ECHO) "*                                           *"
	@$(ECHO) "*        OS-9 Level Two Distribution        *"
	@$(ECHO) "*                                           *"
	@$(ECHO) "*********************************************"
	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)

# Clean all components
clean: dskclean
	$(foreach dir, $(DIRS), ($(CD) $(dir); make clean);)

dskclean:
	-$(RM) $(PACKAGENAME) $(DSK1) $(DSK2)

dsk: all $(PACKAGENAME)

dskcopy: dsk
	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)

$(PACKAGENAME): $(DSK1) $(DSK2) ReadMe ChangeLog
	$(ARCHIVE) $@ $^

$(DSK1):
	-$(RM) $@
	$(OS9FORMAT_DS40) $@ -n"OS-9 Level Two System Disk"
	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNEL)
	$(MAKDIR) $@,CMDS
	$(MAKDIR) $@,SYS
	$(MAKDIR) $@,DEFS
	$(CP) MODULES/$(SYSGO) $@,
	$(OS9ATTR_EXEC) $@,$(SYSGO)
	$(CD) CMDS; $(CP) $(CMDS) ../$@,CMDS
	$(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);)
	$(CD) SYS; $(CP) $(SYSBIN) ../$@,SYS
	$(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);)
	$(CD) SYS; $(CPL) $(SYSTEXT) ../$@,SYS
	$(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);)
	$(CD) DEFS; $(CPL) $(DEFS) ../$@,DEFS
	$(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);)
	$(CPL) $(ROOTFILES) $@,.
	$(foreach file, $(ROOTFILES), $(OS9ATTR_TEXT) $@,$(file);)

$(DSK2):
	-$(RM) $@
	$(OS9FORMAT_DS40) $@ -n"OS-9 Level Two Modules Disk"
	$(MAKDIR) $@,MODULES
	$(CD) MODULES; $(CP) $(MODULES) ../$@,MODULES
	$(foreach file, $(MODULES), $(OS9ATTR_EXEC) $@,MODULES/$(file);)