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