|
|
1.1 root 1: #
2: #$Header: Makefile,v 1.12 83/09/12 15:33:20 layer Exp $
3: #
4: #$Locker: $
5: #
6: # Franz Lisp C coded kernel
7: #
8: #-- Default Paths:
9: # see ../../ReadMe for a explaination of what LibDir and CopyTo mean
10: # D is the directory used for holding intermediate files during
11: # compilation
12: #-- Options:
13: # there is one compile time options which can be set in this file
14: # * do profiling (ala the unix prof(1) command)
15: #
16: # The selection of this options is made below
17: # Other options can be selected by editing ../h/config.h or via
18: # ../../lispconf
19: #
20: LibDir = /a/franz/lisplib
21: ObjDir = /usr/ucb
22: CopyTo = /dev/null
23: Liszt = liszt
24: Lisp = lisp
25: # if you change this you must recompile rlc.c
26: # (and change the value in ../Makefile)
27: #
28: HOLE= 2097152
29:
30: .DEFAULT: nlisp
31:
32: MipSrc1= ../low.c ../lowaux.s
33: MipSrc2= ../alloc.c ../data.c
34: MipSrc3= ../rlc.c
35: MipSrc4= ../lisp.c ../eval.c ../eval2.c ../inits.c ../io.c ../error.c \
36: ../sysat.c ../lam1.c ../lam2.c ../lam3.c ../lam4.c ../lam5.c\
37: ../lam6.c ../lam7.c ../lam8.c ../lam9.c ../lamr.c ../lamp.c \
38: ../fex1.c ../fex2.c ../fex3.c ../fex4.c ../fexr.c\
39: ../fpipe.c \
40: ../subbig.c ../pbignum.c ../divbig.c \
41: ../ffasl.c ../fasl.c \
42: ../trace.c ../evalf.c ../frame.c ../lamgc.c
43:
44: MipSrc = ${MipSrc1} ${MipSrc2} ${MipSrc3} ${MipSrc4}
45:
46: MipObj1= ../low.o ../lowaux.o
47: MipObj2= ../alloc.o ../data.o
48: HoleMipObj2 = ../Salloc.o ../Sdata.o
49: HoleMipObj3 = ../rlc.o
50: MipObj4= ../lisp.o ../eval.o ../eval2.o ../inits.o ../io.o ../error.o \
51: ../sysat.o ../lam1.o ../lam2.o ../lam3.o ../lam4.o ../lam5.o\
52: ../lam6.o ../lam7.o ../lam8.o ../lam9.o ../lamr.o ../lamp.o \
53: ../fex1.o ../fex2.o ../fex3.o ../fex4.o ../fexr.o\
54: ../fpipe.o \
55: ../subbig.o ../pbignum.o ../divbig.o \
56: ../ffasl.o ../fasl.o \
57: ../trace.o ../evalf.o ../frame.o ../lamgc.o
58:
59:
60: # The order of loading of certain files is important.
61: # low.o must be first and lowaux second.
62: #
63: BottomObj = ${MipObj1}
64:
65: # Different objects are required depending on whether there is to be
66: # a hole between text and data space.
67: #
68: NoHoleObj = /lib/crt0.o ${MipObj2}
69: HoleObj = /lib/hcrt0.o ${HoleMipObj2} ${HoleMipObj3}
70:
71: M68kASrc = alloca.s callg.s dmlad.s ediv.s emul.s hack.s \
72: qfuncl.c realread.sun.s realread.s
73: M68kCSrc = 68k.c adbig.c calqhat.c dodiv.c dsmult.c \
74: exarith.c fixbits.c inewint.c \
75: mlsb.c mulbig.c nargs.c
76: M68kSrc = ${M68kCSrc} ${M68kASrc}
77:
78: M68kObj = 68k.o adbig.o alloca.o callg.o calqhat.o dmlad.o dodiv.o dsmult.o \
79: ediv.o emul.o exarith.o fixbits.o hack.o inewint.o \
80: mlsb.o mulbig.o nargs.o qfuncl.o
81:
82: AllSrc = $(M68kSrc) Makefile first8.c fixregs.sed
83:
84: #ifdef unisoft
85: #Libs = -ltermcap -lm -lc
86: #OsObjs = realread.o
87: #CFLAGS = -I../h
88: #else
89: Libs = -ltermcap -lcore -lm -lc
90: OsObjs = realread.sun.o suncore.o
91: CFLAGS = -O -I../h
92: #endif
93:
94: # on non-ucb systems it might be more
95: # polite to use temporary files rather than pipes
96: #
97: #ifdef unisoft
98: #.SUFFIXES : .c.l.s
99: #.s.o:
100: # first8.out < $< > $*.t; as -o $*.o $*.t; rm $*.t
101: #else
102: .SUFFIXES : .c.l
103: #endif
104: .c.o :
105: #ifdef npinreg
106: # /lib/cpp -I../h $*.c | /lib/xcomp |\
107: # sed -f fixregs.sed > /tmp/x.s; as -o $*.o /tmp/x.s
108: #else
109: cc -c $(CFLAGS) $*.c;\
110: mv `basename $*.o` x; mv x $*.o
111: #endif
112:
113: .l.o :
114: liszt $< > #resc
115: @echo liszt $< done
116:
117:
118: ../rlc.o: ../rlc.c
119: cc -c $(CFLAGS) -DHOLE=${HOLE} ../rlc.c
120: mv rlc.o .. < /dev/null
121:
122: ../Salloc.o: ../alloc.c
123: (echo "# define HOLE"; cat ../alloc.c) > Salloc.c;\
124: make Salloc.o; mv Salloc.o .. < /dev/null ; rm Salloc.c
125:
126: ../Sdata.o: ../data.c
127: (echo "# define HOLE"; cat ../data.c) > Sdata.c;\
128: make Sdata.o; mv Sdata.o .. < /dev/null ; rm Sdata.c
129:
130: #ifdef unisoft
131: #../low.o: ../low.c first8.out
132: # cc -S $(CFLAGS) ../low.c;\
133: # sed s/data/text/ < low.s > low.t;\
134: # as -o ../low.o low.t;\
135: # rm low.s low.t
136: #
137: #qfuncl.o: qfuncl.c first8.out
138: # cc -E $(CFLAGS) ${ProfFlag2} qfuncl.c |\
139: # first8.out | sed 's/^#/|/' > qfuncl.s
140: # as -o qfuncl.o qfuncl.s
141: # rm qfuncl.s
142: #
143: #else
144: ../low.o: ../low.c
145: cc -c $(CFLAGS) -R ../low.c
146: mv low.o .. < /dev/null
147:
148: qfuncl.o: qfuncl.c
149: cc -I../h -E ${ProfFlag2} qfuncl.c > x.s; as -o qfuncl.o x.s; rm x.s
150:
151: suncore.o: suncore.s
152:
153: suncore.s:
154: nm -pg /usr/lib/libcore.a |\
155: egrep '^0.* T' |\
156: sed 's/.* /.long /' > suncore.s
157:
158: #endif
159:
160: # rawlisp is the standard raw lisp system.
161:
162: rawlisp: ${BottomObj} ${NoHoleObj} ${MipObj4} ${M68kObj} ${OsObjs}
163: rm -f rawlisp
164: ld -n -x -o rawlisp -e start ${BottomObj} ${NoHoleObj} \
165: ${M68kObj} ${MipObj4} ${OsObjs} ${Libs}
166: ls -l rawlisp
167:
168:
169: # hlisp is a raw lisp system with a hole between text and data
170:
171: rawhlisp: ${BottomObj} ${HoleObj} ${MipObj4} ${M68kObj} ${OsObjs}
172: rm -f rawhlisp
173: ld -x -H ${HOLE} -o rawhlisp -e hstart ${BottomObj} ${HoleObj} \
174: ${M68kObj} ${MipObj4} ${OsObjs} ${Libs}
175: ls -l rawhlisp
176:
177:
178: clean:
179: rm -f *.o rawlisp rawhlisp nlisp snlisp
180:
181: lint:
182: lint ../h/*.h *.c
183:
184: install: nlisp
185: -rm -f ${ObjDir}/lisp
186: mv nlisp ${ObjDir}/lisp
187: @echo lisp installed
188:
189: nlisp: rawlisp ${LibDir}
190: -rm -f nlisp
191: (cd ${LibDir} ; make Liszt=${Liszt} required)
192: echo "(progn (setq build:map 'map \
193: build:lisp-type 'franz \
194: lisp-library-directory '${LibDir} \
195: build:dir '${LibDir} \
196: lisp-object-directory '${ObjDir}) \
197: (load '${LibDir}/buildlisp)\
198: (dumplisp nlisp))" | ./rawlisp
199: ${LibDir}/tackon map nlisp
200: @echo nlisp built
201:
202:
203: donlisp:
204: -rm -f nlisp
205: make LibDir=${LibDir} Liszt=${Liszt} ObjDir=${ObjDir} nlisp
206:
207: #--- snlisp: create a totally interpreted lisp.
208: # dump as snlisp
209: snlisp: rawlisp
210: echo "(progn (setq build:load t \
211: build:lisp-type 'franz \
212: build:dir '${LibDir} \
213: lisp-object-directory '${ObjDir}\
214: lisp-library-directory '${LibDir})\
215: (load '${LibDir}/buildlisp)\
216: (dumplisp snlisp))" | rawlisp
217:
218:
219: tags: tags ${M68kCSrc} ${MipSrc}
220: ctags ../h/*.h $(M68kCSrc) ${MipSrc}
221:
222: #--- copysource : copy source files to another directory
223: # called via make CopyTo=/xx/yyy/zz copysource
224: #
225: copysource: ${AllSrc}
226: (tar cf - ${AllSrc} | (cd ${CopyTo} ; tar xf -))
227:
228: copyobjects: ${AllObj}
229: (tar cf - ${AllObj} | (cd ${CopyTo} ; tar xf -))
230:
231: scriptcatall: ${AllSrc}
232: @../../scriptcat . franz/68k ${AllSrc} tags
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.