Makefile revision 7997
1DBMENTRY	= fffffc0000010000
2INCLUDES        = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
3
4SOURDIR = ./
5PALCODE  = ../palcode
6INCLUDEH = ../h
7
8ARCHNAME=$(shell uname -m)
9
10### If we are not compiling on an alpha, we must use cross tools ###    
11ifneq ($(ARCHNAME), alpha)
12CC=alpha-unknown-linux-gnu-gcc
13AS=alpha-unknown-linux-gnu-as
14CXX=alpha-unknown-linux-gnu-g++
15LD=alpha-unknown-linux-gnu-ld
16endif
17
18### Make sure that the M5 variable is set ###
19ifndef M5
20$(error The M5 variable must be set)
21endif
22
23all: console
24
25dbmentry.o: dbmentry.s 
26	g++ -I ../h -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ dbmentry.s | \
27	$(AS) -m 21164 -o dbmentry.s.o
28
29console.o: console.c
30	$(CC)  -g3 $(INCLUDES) -D _TIME_T -nostdinc++ -o $*.o -c $*.c
31
32printf.o: printf.c 
33	$(CC)  -g3 $(INCLUDES) -nostdinc++ -o $*.o -c $*.c
34
35paljtokern.s.o: paljtokern.s
36	g++ -I ../h -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
37	$(AS) -m 21164 -o paljtokern.s.o
38
39paljtoslave.s.o: paljtoslave.s
40	g++ -I ../h -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
41	$(AS) -m 21164 -o paljtoslave.s.o
42
43console: console.o dbmentry.o printf.o paljtokern.s.o paljtoslave.s.o 
44	$(LD) -o console  -N -Ttext $(DBMENTRY) -non_shared \
45	dbmentry.s.o console.o printf.o paljtokern.s.o paljtoslave.s.o -lc
46
47install: console
48	scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console
49
50clean:
51	rm -f *.o console *.strip paljtokern.c paljtoslave.c
52