1 1.1 mw # @(#)Makefile.hp300 7.10 (Berkeley) 6/27/91 2 1.1 mw # 3 1.1 mw # Makefile for 4.4 BSD 4 1.1 mw # 5 1.1 mw # This makefile is constructed from a machine description: 6 1.1 mw # config machineid 7 1.1 mw # Most changes should be made in the machine description 8 1.1 mw # /sys/conf/``machineid'' 9 1.1 mw # after which you should do 10 1.1 mw # config machineid 11 1.1 mw # Machine generic makefile changes should be made in 12 1.1 mw # /sys/conf/Makefile.``machinetype'' 13 1.1 mw # after which config should be rerun for all machines of that type. 14 1.1 mw # 15 1.1 mw # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 16 1.1 mw # IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 17 1.1 mw # 18 1.1 mw # -DTRACE compile in kernel tracing hooks 19 1.1 mw # -DQUOTA compile in file system quotas 20 1.1 mw 21 1.1 mw 22 1.1 mw # DEBUG is set to -g by config if debugging is requested (config -g). 23 1.1 mw # PROF is set to -pg by config if profiling is requested (config -p). 24 1.1 mw AS= gcc:compilers/amiga/2.3.3/as ${DEBUG} 25 1.1 mw CC= gcc ${DEBUG} 26 1.1 mw CPP= gcc:compilers/amiga/2.3.3/cpp -traditional 27 1.1 mw LD= ld.bsd 28 1.1 mw TOUCH= touch -f -c 29 1.1 mw GPROF.EX=/usr/src/usr.lib/libc/csu/amiga/gmon.ex 30 1.1 mw 31 1.1 mw # source tree is located via $S relative to the compilation directory 32 1.1 mw S= ../../../.. 33 1.1 mw AMIGA= ../.. 34 1.1 mw 35 1.1 mw INCLUDES= -I. -I$S/arch -I$S -I$S/sys 36 1.1 mw COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Damiga -DREFBIT 37 1.1 mw CFLAGS= -O -mc68020 -m68881 ${COPTS} 38 1.1 mw 39 1.1 mw # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 40 1.1 mw # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 41 1.1 mw # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 42 1.1 mw # is marked as config-dependent. 43 1.1 mw 44 1.1 mw NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 45 1.1 mw NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 46 1.1 mw 47 1.1 mw DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 48 1.1 mw DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 49 1.1 mw 50 1.1 mw PROFILE_C= ${CC} -S -c ${COPTS} $<; \ 51 1.1 mw ex - $*.s < ${GPROF.EX}; \ 52 1.1 mw ${AS} -o $@ $*.s; \ 53 1.1 mw rm -f $*.s 54 1.1 mw 55 1.1 mw NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@ 56 1.1 mw NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@ 57 1.1 mw 58 1.1 mw %OBJS 59 1.1 mw 60 1.1 mw %CFILES 61 1.1 mw 62 1.1 mw # load lines for config "xxx" will be emitted as: 63 1.1 mw # xxx: ${SYSTEM_DEP} swapxxx.o 64 1.1 mw # ${SYSTEM_LD_HEAD} 65 1.1 mw # ${SYSTEM_LD} swapxxx.o 66 1.1 mw # ${SYSTEM_LD_TAIL} 67 1.1 mw SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o 68 1.1 mw #SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} 69 1.1 mw SYSTEM_DEP= Makefile ${SYSTEM_OBJ} 70 1.1 mw SYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 71 1.1 mw SYSTEM_LD= @strip=-x; [ X${DEBUG} = X-g ] && strip=-X; \ 72 1.1 mw ${LD} $$strip -n -o $@ -e start ${SYSTEM_OBJ} vers.o 73 1.1 mw #SYSTEM_LD_TAIL= @echo rearranging symbols;\ 74 1.1 mw # symorder symbols.sort $@;\ 75 1.1 mw SYSTEM_LD_TAIL= @size $@; chmod 755 $@; \ 76 1.1 mw [ X${DEBUG} = X-g ] && { \ 77 1.1 mw echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \ 78 1.1 mw echo strip -d $@; strip -d $@; } || true 79 1.1 mw 80 1.1 mw %LOAD 81 1.1 mw 82 1.1 mw newvers: 83 1.1 mw sh $S/conf/newvers.sh 84 1.1 mw ${CC} $(CFLAGS) -c vers.c 85 1.1 mw 86 1.1 mw clean: 87 1.1 mw rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \ 88 1.1 mw Errs errs linterrs makelinks 89 1.1 mw 90 1.1 mw lint: /tmp param.c 91 1.1 mw @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ 92 1.1 mw ${AMIGA}/amiga/Locore.c ${CFILES} ${AMIGA}/amiga/swapgeneric.c \ 93 1.1 mw ioconf.c param.c| \ 94 1.1 mw grep -v 'struct/union .* never defined' | \ 95 1.1 mw grep -v 'possible pointer alignment problem' 96 1.1 mw 97 1.1 mw symbols.sort: ${AMIGA}/amiga/symbols.raw 98 1.1 mw grep -v '^#' ${AMIGA}/amiga/symbols.raw \ 99 1.1 mw | sed 's/^ //' | sort -u > symbols.sort 100 1.1 mw 101 1.1 mw locore.o: assym.s ${AMIGA}/amiga/vectors.s ${AMIGA}/amiga/locore.s 102 1.1 mw locore.o: ${AMIGA}/include/trap.h ${AMIGA}/include/psl.h ${AMIGA}/amiga/pte.h 103 1.1 mw locore.o: ${AMIGA}/include/cpu.h 104 1.1 mw ${CPP} -DLOCORE ${COPTS} ${AMIGA}/amiga/locore.s | ${AS} -o locore.o 105 1.1 mw 106 1.1 mw # the following is necessary because autoconf.o depends on #if GENERIC 107 1.1 mw autoconf.o: Makefile 108 1.1 mw 109 1.1 mw # the following are necessary because the files depend on the types of 110 1.1 mw # hp cpu's included in the system configuration 111 1.1 mw clock.o machdep.o autoconf.o conf.o: Makefile 112 1.1 mw 113 1.1 mw # depend on network configuration 114 1.1 mw af.o uipc_proto.o locore.o: Makefile 115 1.1 mw 116 1.1 mw # depend on maxusers 117 1.1 mw assym.s: Makefile 118 1.1 mw 119 1.1 mw assym.s: genassym 120 1.1 mw ./genassym >assym.s 121 1.1 mw 122 1.1 mw genassym: 123 1.1 mw ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Damiga -o genassym \ 124 1.1 mw ${AMIGA}/amiga/genassym.c 125 1.1 mw 126 1.1 mw depend: assym.s param.c 127 1.1 mw mkdep ${COPTS} ${CFILES} ioconf.c param.c 128 1.1 mw mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${AMIGA}/amiga/genassym.c 129 1.1 mw 130 1.1 mw links: 131 1.1 mw egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 132 1.1 mw sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 133 1.1 mw echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 134 1.1 mw sort -u | comm -23 - dontlink | \ 135 1.1 mw sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 136 1.1 mw sh makelinks && rm -f dontlink 137 1.1 mw 138 1.1 mw tags: 139 1.1 mw @echo "see $S/kern/Makefile for tags" 140 1.1 mw 141 1.1 mw ioconf.o: ioconf.c 142 1.1 mw ${CC} -c ${CFLAGS} ioconf.c 143 1.1 mw 144 1.1 mw param.c: $S/conf/param.c 145 1.1 mw rm -f param.c 146 1.1 mw cp $S/conf/param.c . 147 1.1 mw 148 1.1 mw param.o: param.c Makefile 149 1.1 mw ${CC} -c ${CFLAGS} ${PARAM} param.c 150 1.1 mw 151 1.1 mw %RULES 152