Makefile (7991:8e85b6d54396) Makefile (7992:fabe6a2d9c5e)
1
2all: console
3
4DBMENTRY = fffffc0000010000
5INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
6
7SOURDIR = ./
8PALCODE = ../palcode
9INCLUDEH = ../h
1DBMENTRY = fffffc0000010000
2INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev
3
4SOURDIR = ./
5PALCODE = ../palcode
6INCLUDEH = ../h
10CC=gcc
11#AS=gas
12
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
13dbmentry.o: dbmentry.s
25dbmentry.o: dbmentry.s
14 $(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s
26 g++ -I ../h -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ dbmentry.s | \
27 $(AS) -m 21164 -o dbmentry.s.o
15
16console.o: console.c
28
29console.o: console.c
17 $(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
30 $(CC) -g3 $(INCLUDES) -D _TIME_T -nostdinc++ -o $*.o -c $*.c
18
19printf.o: printf.c
31
32printf.o: printf.c
20 $(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
33 $(CC) -g3 $(INCLUDES) -nostdinc++ -o $*.o -c $*.c
21
22paljtokern.s.o: paljtokern.s
23 g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
34
35paljtokern.s.o: paljtokern.s
36 g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \
24 gas -m 21164 -o paljtokern.s.o
37 $(AS) -m 21164 -o paljtokern.s.o
25
26paljtoslave.s.o: paljtoslave.s
27 g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
38
39paljtoslave.s.o: paljtoslave.s
40 g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \
28 gas -m 21164 -o paljtoslave.s.o
41 $(AS) -m 21164 -o paljtoslave.s.o
29
42
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
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
34
46
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
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