Makefile revision 7985:3e932649220c
1
2all: console
3
4DBMENTRY	= fffffc0000010000
5INCLUDES        = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
6
7SOURDIR = ./
8PALCODE  = ../palcode
9INCLUDEH = ../h
10CC=gcc
11AS=gas
12
13dbmentry.o: dbmentry.s 
14	$(AS)  $(INCLUDES) -nointrinsics -o $*.o $*.s
15
16console.o: console.c
17	$(CC)  -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
18
19printf.o: printf.c 
20	$(CC)  -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
21
22paljtokern.s.o: paljtokern.s
23	g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
24	gas -m 21164 -o paljtokern.s.o
25
26paljtoslave.s.o: paljtoslave.s
27	g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
28	gas -m 21164 -o paljtoslave.s.o
29
30paljtokern.c: paljtokern.s.o
31	echo 'unsigned int palJToKern[] = {' > paljtokern.c
32	dis paljtokern.s.o | awk '{print "0x"$$2","}' >> paljtokern.c
33	echo "0x0\n};" >> paljtokern.c
34
35paljtoslave.c: paljtoslave.s.o
36	echo "unsigned int palJToSlave[] = {" > paljtoslave.c
37	dis paljtoslave.s.o | awk '{print "0x"$$2","}' >> paljtoslave.c
38	echo "0x0\n};" >> paljtoslave.c
39
40paljtokern.c.o: paljtokern.c
41	$(CC) -g3 -nointrinsics -o paljtokern.c.o -c paljtokern.c
42
43paljtoslave.c.o: paljtoslave.c
44	$(CC) -g3 -nointrinsics -o paljtoslave.c.o -c paljtoslave.c
45
46console: console.o dbmentry.o printf.o paljtokern.c.o paljtoslave.c.o 
47	$(LD) -o console  -N -T $(DBMENTRY) -non_shared \
48	dbmentry.o console.o printf.o paljtokern.c.o paljtoslave.c.o -lc
49
50install: console
51	scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console
52
53clean:
54	rm -f *.o console *.strip paljtokern.c paljtoslave.c
55