changeset 868:f3670cfbf025

Added more intelligence to making DSK image
author boisy
date Thu, 16 Jan 2003 20:15:53 +0000
parents 0198655f2552
children af0a648f438c
files 3rdparty/packages/cc/makefile
diffstat 1 files changed, 30 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/packages/cc/makefile	Thu Jan 16 19:54:21 2003 +0000
+++ b/3rdparty/packages/cc/makefile	Thu Jan 16 20:15:53 2003 +0000
@@ -1,18 +1,37 @@
 include ../../../Makefile.rules
 
-DEPENDS		= ./Makefile
+DISK	= cc.dsk
+CMDS	= cc1 c.prep c.pass1 c.pass2 c.opt c.asm c.link
 
-CMDS	= c.prep
-ALLOBJS		= $(CMDS)
+# Make all components
+all:	$(CMDS)
+	@$(ECHO) "*********************************************"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*                 C Compiler                *"
+	@$(ECHO) "*                                           *"
+	@$(ECHO) "*********************************************"
+	-$(CD) SOURCES; $(UNIX2OS9) *.a *.c
+	-$(CD) DEFS; $(UNIX2OS9) *.h
 
-all:	$(ALLOBJS)
-	$(CHMOD) 755 $(ALLOBJS)
+# Clean all components
+clean:	dskclean
+	-$(CD) SOURCES; $(OS92UNIX) *.a *.c
+	-$(CD) DEFS; $(OS92UNIX) *.h
 
-clean:
-	$(RM) $(ALLOBJS)
+dsk:	all
+	$(RM) $(DISK)
+	$(OS9FORMAT) $(DISK) -t40 -h2 -n"C Compiler"
+	$(MAKDIR) $(DISK),CMDS
+	$(MAKDIR) $(DISK),LIB
+	$(MAKDIR) $(DISK),DEFS
+	$(MAKDIR) $(DISK),SOURCES
+	$(MAKDIR) $(DISK),SOURCES/SYS
+	$(CP) $(CMDS) $(DISK),CMDS
+	$(CP) DEFS/*.h $(DISK),DEFS
+	$(CP) LIB/*.l LIB/*.r $(DISK),LIB
+	$(CP) SOURCES/*.c $(DISK),SOURCES
+	$(CP) SOURCES/*.a $(DISK),SOURCES/SYS
 
-identify:
-	$(IDENT_SHORT) $(ALLOBJS)
+dskclean:
+	-$(RM) $(DISK)
 
-showallobjs:
-	@$(ECHO) $(ALLOBJS)