Makefile revision 7977:60051d2262c2
1# 
2# $Id: Makefile,v 1.2 1997/12/16 01:18:38 bugnion Exp $
3#
4# Revision History:
5#
6# $Log: Makefile,v $
7# Revision 1.2  1997/12/16 01:18:38  bugnion
8# Removed bogus TLASER offsets from palcode build. -- roll over
9# simultaneously with the simulation tree
10#
11# Revision 1.1.1.1  1997/10/30 23:27:18  verghese
12# current 10/29/97
13#
14#
15# Set environment variables to point to various things:
16#
17#	EB_TOOLBOX - Where your toolset is located
18#
19
20EB_TOOLBOX =  /wrl/proj/simos/bin/tools/osf
21CPP	  =	/usr/bin/cpp
22AS	  =	$(EB_TOOLBOX)/gas
23LD	  =	$(EB_TOOLBOX)/gld
24DIS	  =	$(EB_TOOLBOX)/alist
25STRIP	  =	$(EB_TOOLBOX)/astrip
26PVC	  =	$(EB_TOOLBOX)/pvc
27MAKEDEP	  =	$(CPP) -MM
28
29#
30# Define KDEBUG if you want a special unprivileged CALL_PAL 
31# breakpoint trap handler for remote kernel debugging.
32#
33# Define CONSOLE_ENTRY to change the sys$enter_console
34# transfer address.  Default CONSOLE_ENTRY value is 0x10000.
35#
36# Define DISABLE_CRD to disable CRD. Note that reset sets MCES so that
37# correctable errors are ignored anyway, but this actually stops the
38# interrupt.
39#
40
41DEFINES   =	 -DDISABLE_CRD -DSIMOS -DBUILD_PALCODE
42DEFINES  +=  -I$(SIMTOOLS)/cpus-alpha/simos
43
44CPPFLAGS  =
45ASFLAGS   =	-21164
46#LDFLAGS   =	-Tstrip 0 -Thdr -N
47#LDFLAGS   =	-Tstrip 2000 -Thdr -N  # removed bugnion
48LDFLAGS   =	-Tstrip 4000 -Thdr -N
49# Source files:
50#
51#   This is the only block in which the list of source files should change.
52#
53#	SFILES - assembler source files
54#	HFILES - header files
55#
56
57SFILES	= osfpal.s platform.s
58
59HFILES	= dc21164.h \
60	  osf.h \
61	  macros.h \
62	  ev5_impure.h \
63	  cserve.h \
64	  platform.h
65
66# Intermediate files:
67#
68#   This block should not change.
69#
70
71IFILES	= $(SFILES:.s=.i)
72
73# Object files:
74#
75#   This block should not change.
76#
77
78OFILES 	= $(IFILES:.i=.o)
79
80.DEFAULT:
81	co -u $<
82
83.SUFFIXES:
84.SUFFIXES: .s .i .o
85
86.s.i:
87	$(CPP) $(CPPFLAGS) $(DEFINES) $< $*.i
88
89osfpal.nh: osfpal
90	$(STRIP) -a osfpal $@
91	$(DIS) osfpal >osfpal.dis
92
93osfpal: $(OFILES)
94	echo '$OFILES= ' $(OFILES)
95	$(LD) $(LDFLAGS) -o $@ $(OFILES)
96
97osfpal.o: osfpal.i
98	$(AS) $(ASFLAGS) -o $@ osfpal.i
99
100platform.o: platform.i
101	$(AS) $(ASFLAGS)  -o $@ platform.i
102
103pvc: osfpal.lis osfpal.nh osfpal.ent osfpal.map
104	(export PVC_PAL PVC_ENTRY PVC_MAP PVC_CPU;	\
105	 PVC_PAL=osfpal.nh;				\
106	 PVC_ENTRY=osfpal.ent;				\
107	 PVC_MAP=osfpal.map;				\
108	 PVC_CPU=ev5;					\
109	 $(PVC);)
110
111osfpal.lis: osfpal
112	$(DIS) osfpal > $@
113
114osfpal.map: osfpal
115	$(DIS) -m osfpal > $@
116	
117depend:
118	@cat < /dev/null > makedep
119	@(for i in $(SFILES); do echo $$i; \
120	    $(MAKEDEP) $(DEFINES) $$i | 					\
121		awk '{ if ($$1 != prev) {if (rec != "") print rec; 		\
122		    rec = $$0; prev = $$1; } 					\
123		    else { if (length(rec $$2) > 78) { print rec; rec = $$0; } 	\
124		    else rec = rec " " $$2 } }		 			\
125		    END { print rec }' | sed 's/\.o/\.i/'			\
126		    >> makedep; done)
127	@echo '/^# DO NOT DELETE THIS LINE/+1,$$d' > eddep
128	@echo '$$r makedep' >> eddep
129	@echo 'w' >> eddep
130	@cp Makefile Makefile.bak
131	@ed - Makefile < eddep
132	@rm -f eddep makedep
133	@echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
134	@echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
135	@echo '# see make depend above' >> Makefile
136
137clean:
138	rm -f core $(OFILES) $(IFILES)
139
140clobber: clean
141	rm -f osfpal.lis osfpal.nh osfpal.map osfpal
142
143rcsinfo:
144	rlog RCS/*
145
146rcsget:
147	co -u $(HFILES) $(SFILES)
148
149# DO NOT DELETE THIS LINE
150osfpal.i:	osfpal.s
151platform.i:	platform.s ./cserve.h ./platform.h
152# DEPENDENCIES MUST END AT END OF FILE
153# IF YOU PUT STUFF HERE IT WILL GO AWAY
154# see make depend above
155
156
157
158