Makefile revision 7977
17977Shsul@eecs.umich.edu# 
27977Shsul@eecs.umich.edu# $Id: Makefile,v 1.2 1997/12/16 01:18:38 bugnion Exp $
37977Shsul@eecs.umich.edu#
47977Shsul@eecs.umich.edu# Revision History:
57977Shsul@eecs.umich.edu#
67977Shsul@eecs.umich.edu# $Log: Makefile,v $
77977Shsul@eecs.umich.edu# Revision 1.2  1997/12/16 01:18:38  bugnion
87977Shsul@eecs.umich.edu# Removed bogus TLASER offsets from palcode build. -- roll over
97977Shsul@eecs.umich.edu# simultaneously with the simulation tree
107977Shsul@eecs.umich.edu#
117977Shsul@eecs.umich.edu# Revision 1.1.1.1  1997/10/30 23:27:18  verghese
127977Shsul@eecs.umich.edu# current 10/29/97
137977Shsul@eecs.umich.edu#
147977Shsul@eecs.umich.edu#
157977Shsul@eecs.umich.edu# Set environment variables to point to various things:
167977Shsul@eecs.umich.edu#
177977Shsul@eecs.umich.edu#	EB_TOOLBOX - Where your toolset is located
187977Shsul@eecs.umich.edu#
197977Shsul@eecs.umich.edu
207977Shsul@eecs.umich.eduEB_TOOLBOX =  /wrl/proj/simos/bin/tools/osf
217977Shsul@eecs.umich.eduCPP	  =	/usr/bin/cpp
227977Shsul@eecs.umich.eduAS	  =	$(EB_TOOLBOX)/gas
237977Shsul@eecs.umich.eduLD	  =	$(EB_TOOLBOX)/gld
247977Shsul@eecs.umich.eduDIS	  =	$(EB_TOOLBOX)/alist
257977Shsul@eecs.umich.eduSTRIP	  =	$(EB_TOOLBOX)/astrip
267977Shsul@eecs.umich.eduPVC	  =	$(EB_TOOLBOX)/pvc
277977Shsul@eecs.umich.eduMAKEDEP	  =	$(CPP) -MM
287977Shsul@eecs.umich.edu
297977Shsul@eecs.umich.edu#
307977Shsul@eecs.umich.edu# Define KDEBUG if you want a special unprivileged CALL_PAL 
317977Shsul@eecs.umich.edu# breakpoint trap handler for remote kernel debugging.
327977Shsul@eecs.umich.edu#
337977Shsul@eecs.umich.edu# Define CONSOLE_ENTRY to change the sys$enter_console
347977Shsul@eecs.umich.edu# transfer address.  Default CONSOLE_ENTRY value is 0x10000.
357977Shsul@eecs.umich.edu#
367977Shsul@eecs.umich.edu# Define DISABLE_CRD to disable CRD. Note that reset sets MCES so that
377977Shsul@eecs.umich.edu# correctable errors are ignored anyway, but this actually stops the
387977Shsul@eecs.umich.edu# interrupt.
397977Shsul@eecs.umich.edu#
407977Shsul@eecs.umich.edu
417977Shsul@eecs.umich.eduDEFINES   =	 -DDISABLE_CRD -DSIMOS -DBUILD_PALCODE
427977Shsul@eecs.umich.eduDEFINES  +=  -I$(SIMTOOLS)/cpus-alpha/simos
437977Shsul@eecs.umich.edu
447977Shsul@eecs.umich.eduCPPFLAGS  =
457977Shsul@eecs.umich.eduASFLAGS   =	-21164
467977Shsul@eecs.umich.edu#LDFLAGS   =	-Tstrip 0 -Thdr -N
477977Shsul@eecs.umich.edu#LDFLAGS   =	-Tstrip 2000 -Thdr -N  # removed bugnion
487977Shsul@eecs.umich.eduLDFLAGS   =	-Tstrip 4000 -Thdr -N
497977Shsul@eecs.umich.edu# Source files:
507977Shsul@eecs.umich.edu#
517977Shsul@eecs.umich.edu#   This is the only block in which the list of source files should change.
527977Shsul@eecs.umich.edu#
537977Shsul@eecs.umich.edu#	SFILES - assembler source files
547977Shsul@eecs.umich.edu#	HFILES - header files
557977Shsul@eecs.umich.edu#
567977Shsul@eecs.umich.edu
577977Shsul@eecs.umich.eduSFILES	= osfpal.s platform.s
587977Shsul@eecs.umich.edu
597977Shsul@eecs.umich.eduHFILES	= dc21164.h \
607977Shsul@eecs.umich.edu	  osf.h \
617977Shsul@eecs.umich.edu	  macros.h \
627977Shsul@eecs.umich.edu	  ev5_impure.h \
637977Shsul@eecs.umich.edu	  cserve.h \
647977Shsul@eecs.umich.edu	  platform.h
657977Shsul@eecs.umich.edu
667977Shsul@eecs.umich.edu# Intermediate files:
677977Shsul@eecs.umich.edu#
687977Shsul@eecs.umich.edu#   This block should not change.
697977Shsul@eecs.umich.edu#
707977Shsul@eecs.umich.edu
717977Shsul@eecs.umich.eduIFILES	= $(SFILES:.s=.i)
727977Shsul@eecs.umich.edu
737977Shsul@eecs.umich.edu# Object files:
747977Shsul@eecs.umich.edu#
757977Shsul@eecs.umich.edu#   This block should not change.
767977Shsul@eecs.umich.edu#
777977Shsul@eecs.umich.edu
787977Shsul@eecs.umich.eduOFILES 	= $(IFILES:.i=.o)
797977Shsul@eecs.umich.edu
807977Shsul@eecs.umich.edu.DEFAULT:
817977Shsul@eecs.umich.edu	co -u $<
827977Shsul@eecs.umich.edu
837977Shsul@eecs.umich.edu.SUFFIXES:
847977Shsul@eecs.umich.edu.SUFFIXES: .s .i .o
857977Shsul@eecs.umich.edu
867977Shsul@eecs.umich.edu.s.i:
877977Shsul@eecs.umich.edu	$(CPP) $(CPPFLAGS) $(DEFINES) $< $*.i
887977Shsul@eecs.umich.edu
897977Shsul@eecs.umich.eduosfpal.nh: osfpal
907977Shsul@eecs.umich.edu	$(STRIP) -a osfpal $@
917977Shsul@eecs.umich.edu	$(DIS) osfpal >osfpal.dis
927977Shsul@eecs.umich.edu
937977Shsul@eecs.umich.eduosfpal: $(OFILES)
947977Shsul@eecs.umich.edu	echo '$OFILES= ' $(OFILES)
957977Shsul@eecs.umich.edu	$(LD) $(LDFLAGS) -o $@ $(OFILES)
967977Shsul@eecs.umich.edu
977977Shsul@eecs.umich.eduosfpal.o: osfpal.i
987977Shsul@eecs.umich.edu	$(AS) $(ASFLAGS) -o $@ osfpal.i
997977Shsul@eecs.umich.edu
1007977Shsul@eecs.umich.eduplatform.o: platform.i
1017977Shsul@eecs.umich.edu	$(AS) $(ASFLAGS)  -o $@ platform.i
1027977Shsul@eecs.umich.edu
1037977Shsul@eecs.umich.edupvc: osfpal.lis osfpal.nh osfpal.ent osfpal.map
1047977Shsul@eecs.umich.edu	(export PVC_PAL PVC_ENTRY PVC_MAP PVC_CPU;	\
1057977Shsul@eecs.umich.edu	 PVC_PAL=osfpal.nh;				\
1067977Shsul@eecs.umich.edu	 PVC_ENTRY=osfpal.ent;				\
1077977Shsul@eecs.umich.edu	 PVC_MAP=osfpal.map;				\
1087977Shsul@eecs.umich.edu	 PVC_CPU=ev5;					\
1097977Shsul@eecs.umich.edu	 $(PVC);)
1107977Shsul@eecs.umich.edu
1117977Shsul@eecs.umich.eduosfpal.lis: osfpal
1127977Shsul@eecs.umich.edu	$(DIS) osfpal > $@
1137977Shsul@eecs.umich.edu
1147977Shsul@eecs.umich.eduosfpal.map: osfpal
1157977Shsul@eecs.umich.edu	$(DIS) -m osfpal > $@
1167977Shsul@eecs.umich.edu	
1177977Shsul@eecs.umich.edudepend:
1187977Shsul@eecs.umich.edu	@cat < /dev/null > makedep
1197977Shsul@eecs.umich.edu	@(for i in $(SFILES); do echo $$i; \
1207977Shsul@eecs.umich.edu	    $(MAKEDEP) $(DEFINES) $$i | 					\
1217977Shsul@eecs.umich.edu		awk '{ if ($$1 != prev) {if (rec != "") print rec; 		\
1227977Shsul@eecs.umich.edu		    rec = $$0; prev = $$1; } 					\
1237977Shsul@eecs.umich.edu		    else { if (length(rec $$2) > 78) { print rec; rec = $$0; } 	\
1247977Shsul@eecs.umich.edu		    else rec = rec " " $$2 } }		 			\
1257977Shsul@eecs.umich.edu		    END { print rec }' | sed 's/\.o/\.i/'			\
1267977Shsul@eecs.umich.edu		    >> makedep; done)
1277977Shsul@eecs.umich.edu	@echo '/^# DO NOT DELETE THIS LINE/+1,$$d' > eddep
1287977Shsul@eecs.umich.edu	@echo '$$r makedep' >> eddep
1297977Shsul@eecs.umich.edu	@echo 'w' >> eddep
1307977Shsul@eecs.umich.edu	@cp Makefile Makefile.bak
1317977Shsul@eecs.umich.edu	@ed - Makefile < eddep
1327977Shsul@eecs.umich.edu	@rm -f eddep makedep
1337977Shsul@eecs.umich.edu	@echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
1347977Shsul@eecs.umich.edu	@echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
1357977Shsul@eecs.umich.edu	@echo '# see make depend above' >> Makefile
1367977Shsul@eecs.umich.edu
1377977Shsul@eecs.umich.educlean:
1387977Shsul@eecs.umich.edu	rm -f core $(OFILES) $(IFILES)
1397977Shsul@eecs.umich.edu
1407977Shsul@eecs.umich.educlobber: clean
1417977Shsul@eecs.umich.edu	rm -f osfpal.lis osfpal.nh osfpal.map osfpal
1427977Shsul@eecs.umich.edu
1437977Shsul@eecs.umich.edurcsinfo:
1447977Shsul@eecs.umich.edu	rlog RCS/*
1457977Shsul@eecs.umich.edu
1467977Shsul@eecs.umich.edurcsget:
1477977Shsul@eecs.umich.edu	co -u $(HFILES) $(SFILES)
1487977Shsul@eecs.umich.edu
1497977Shsul@eecs.umich.edu# DO NOT DELETE THIS LINE
1507977Shsul@eecs.umich.eduosfpal.i:	osfpal.s
1517977Shsul@eecs.umich.eduplatform.i:	platform.s ./cserve.h ./platform.h
1527977Shsul@eecs.umich.edu# DEPENDENCIES MUST END AT END OF FILE
1537977Shsul@eecs.umich.edu# IF YOU PUT STUFF HERE IT WILL GO AWAY
1547977Shsul@eecs.umich.edu# see make depend above
1557977Shsul@eecs.umich.edu
1567977Shsul@eecs.umich.edu
1577977Shsul@eecs.umich.edu
158