Makefile.i386 revision 241
1139823Simp# Copyright 1990 W. Jolitz 21541Srgrimes# @(#)Makefile.i386 7.1 5/10/91 31541Srgrimes# Makefile for 4.3 BSD-Reno 41541Srgrimes# 51541Srgrimes# This makefile is constructed from a machine description: 61541Srgrimes# config machineid 71541Srgrimes# Most changes should be made in the machine description 81541Srgrimes# /sys/i386/conf/``machineid'' 91541Srgrimes# after which you should do 101541Srgrimes# config machineid 111541Srgrimes# Generic makefile changes should be made in 121541Srgrimes# /sys/i386/conf/Makefile.i386 131541Srgrimes# after which config should be rerun for all machines. 141541Srgrimes# 151541Srgrimes# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE TO MAKEFILE 161541Srgrimes# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 171541Srgrimes# 181541Srgrimes# -DTRACE compile in kernel tracing hooks 191541Srgrimes# -DQUOTA compile in file system quotas 201541Srgrimes# 211541Srgrimes 221541SrgrimesTOUCH= touch -f -c 231541SrgrimesLD= /usr/bin/ld 241541SrgrimesCC= cc 251541SrgrimesCPP= cpp 261541Srgrimes 271541SrgrimesS= ../.. 281541SrgrimesI386= ../../i386 291541Srgrimes 301541SrgrimesINCLUDES= -I. -I$S -I$S/sys 311541SrgrimesCOPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX 321541SrgrimesASFLAGS= 331541SrgrimesCFLAGS= -O ${DEBUG} ${COPTS} 341541Srgrimes 351541SrgrimesNORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 361541SrgrimesNORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 37174895SrwatsonNORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 38174895SrwatsonDRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 39174895SrwatsonDRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 401541SrgrimesSYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o 411541SrgrimesSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 42182184SjkimSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 431541SrgrimesSYSTEM_LD= @${LD} -z -T FE000000 -o $@ -X vers.o ${SYSTEM_OBJS} 441541SrgrimesSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 451541Srgrimes dbsym $@ 2>/dev/null || true; size $@; chmod 755 $@ 4699419Speter 471541SrgrimesGPROF.EX= /usr/src/lib/csu.i386/gprof.ex 481541SrgrimesPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 491541Srgrimes ex - $*.s < ${GPROF.EX} ; \ 501541Srgrimes ${AS} -o $@ $*.s ; \ 5140779Sdfr rm -f $*.s 5240779Sdfr 531541Srgrimes%OBJS 541541Srgrimes 5540779Sdfr%CFILES 5640779Sdfr 5740779Sdfr%LOAD 581541Srgrimes 5940779Sdfrclean: 6040779Sdfr rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \ 6140779Sdfr errs linterrs makelinks genassym 6240779Sdfr 631541Srgrimeslint: /tmp param.c 641541Srgrimes @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 6555205Speter ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 661541Srgrimes grep -v 'struct/union .* never defined' | \ 67182184Sjkim grep -v 'possible pointer alignment problem' 68182184Sjkim 6941588Seivindsymbols.sort: ${I386}/i386/symbols.raw 7041588Seivind grep -v '^#' ${I386}/i386/symbols.raw \ 7155205Speter | sed 's/^ //' | sort -u > symbols.sort 721541Srgrimes 731541Srgrimeslocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 741541Srgrimes machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 751541Srgrimes $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \ 761541Srgrimes ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h 771541Srgrimes ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 781541Srgrimes ${AS} ${ASFLAGS} -o locore.o 791541Srgrimes 801541Srgrimes# the following is necessary because autoconf.o depends on #if GENERIC 811541Srgrimesautoconf.o: Makefile 821541Srgrimes 831541Srgrimes# depend on network configuration 841541Srgrimesaf.o uipc_proto.o locore.o: Makefile 8592725Salfred 8692725Salfred# depend on maxusers 8712579Sbdeassym.s machdep.o: Makefile 8841588Seivind 89177003Srwatson# depends on KDB (cons.o also depends on GENERIC) 901541Srgrimestrap.o cons.o: Makefile 91177003Srwatson 92177003Srwatsonassym.s: $S/sys/param.h machine/pte.h $S/sys/buf.h \ 93177003Srwatson $S/sys/vmmeter.h \ 941541Srgrimes $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h 951541Srgrimes 961541Srgrimesassym.s: genassym 971541Srgrimes ./genassym >assym.s 981541Srgrimes 991541Srgrimesgenassym: 1001541Srgrimes ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 1011541Srgrimes ${I386}/i386/genassym.c -o genassym 1021541Srgrimes 1031541Srgrimesdepend: assym.s param.c 1041541Srgrimes sh /usr/bin/mkdep ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 1051541Srgrimes sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c 1061541Srgrimes 1071541Srgrimeslinks: 1081541Srgrimes egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1091541Srgrimes sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1101541Srgrimes echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1111541Srgrimes sort -u | comm -23 - dontlink | \ 1121541Srgrimes sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 1131541Srgrimes sh makelinks && rm -f dontlink 1141541Srgrimes 11541588Seivindtags: 11641588Seivind @echo "see $S/kern/Makefile for tags" 11741588Seivind 11841588Seivindioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 11941588Seivind ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 1201541Srgrimes ${CC} -c ${CFLAGS} ioconf.c 1211541Srgrimes 12241588Seivindconf.o: $S/sys/param.h $S/sys/systm.h $S/sys/buf.h $S/sys/ioctl.h \ 12341588Seivind $S/sys/tty.h $S/sys/conf.h \ 12441588Seivind as.h bpfilter.h cd.h ch.h com.h dcfclk.h fd.h lpa.h \ 12541588Seivind lpt.h pty.h sd.h speaker.h st.h wd.h wt.h \ 12641588Seivind ${I386}/i386/conf.c 1271541Srgrimes ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c 1281541Srgrimes 12941588Seivindparam.c: $S/conf/param.c \ 13041588Seivind $S/sys/param.h $S/sys/systm.h $S/sys/socket.h $S/sys/proc.h \ 13141588Seivind $S/sys/vnode.h $S/sys/file.h $S/sys/callout.h $S/sys/clist.h \ 13241588Seivind $S/sys/mbuf.h $S/ufs/quota.h $S/sys/kernel.h machine/vmparam.h \ 13341588Seivind $S/sys/shm.h 1341541Srgrimes -rm -f param.c 1351541Srgrimes cp $S/conf/param.c . 1361541Srgrimes 137177003Srwatsonparam.o: param.c Makefile 1381541Srgrimes ${CC} -c ${CFLAGS} ${PARAM} param.c 1391541Srgrimes 14041588Seivindvers.o: ${SYSTEM_DEP} 141177003Srwatson sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 1421541Srgrimes ${CC} ${CFLAGS} -c vers.c 143177003Srwatson 144177003Srwatson%RULES 145177003Srwatson 1461541Srgrimes# DO NOT DELETE THIS LINE -- make depend uses it 1471541Srgrimes 1481541Srgrimes