Home | History | Annotate | Line # | Download | only in conf
Makefile.sparc revision 1.3
      1  1.1  deraadt # from:	@(#)Makefile.sparc	8.1 (Berkeley) 7/19/93
      2  1.3  deraadt # $Id: Makefile.sparc,v 1.3 1993/11/29 05:37:56 deraadt Exp $
      3  1.1  deraadt # Makefile for 4.4 BSD
      4  1.1  deraadt #
      5  1.1  deraadt # This makefile is constructed from a machine description:
      6  1.1  deraadt #	config machineid
      7  1.1  deraadt # Most changes should be made in the machine description
      8  1.1  deraadt #	/sys/conf/``machineid''
      9  1.1  deraadt # after which you should do
     10  1.1  deraadt #	 config machineid
     11  1.1  deraadt # Machine generic makefile changes should be made in
     12  1.1  deraadt #	/sys/conf/Makefile.``machinetype''
     13  1.1  deraadt # after which config should be rerun for all machines of that type.
     14  1.1  deraadt #
     15  1.1  deraadt # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
     16  1.1  deraadt #	IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
     17  1.1  deraadt #
     18  1.1  deraadt # -DTRACE	compile in kernel tracing hooks
     19  1.1  deraadt # -DQUOTA	compile in file system quotas
     20  1.1  deraadt 
     21  1.1  deraadt # DEBUG is set to -g if debugging.
     22  1.1  deraadt # PROF is set to -pg if profiling.
     23  1.1  deraadt 
     24  1.1  deraadt AS?=	as
     25  1.1  deraadt 
     26  1.2  deraadt CC=	gcc ${DEBUG}
     27  1.1  deraadt CPP=	cpp
     28  1.1  deraadt LD=	ld
     29  1.1  deraadt TOUCH=	touch -f -c
     30  1.1  deraadt 
     31  1.1  deraadt # source tree is located via $S relative to the compilation directory
     32  1.2  deraadt S=	../../../..
     33  1.2  deraadt SPARC=	../..
     34  1.2  deraadt LIBKERN=../libkern.a
     35  1.1  deraadt 
     36  1.3  deraadt INCLUDES= -I. -I$S/arch -I$S -I$S/sys
     37  1.1  deraadt COPTS=	${INCLUDES} ${IDENT} -DKERNEL -DSUN4C -Dsun4c
     38  1.2  deraadt CFLAGS=	${COPTS}
     39  1.1  deraadt 
     40  1.1  deraadt # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
     41  1.1  deraadt # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
     42  1.1  deraadt # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
     43  1.1  deraadt # is marked as config-dependent.
     44  1.1  deraadt 
     45  1.1  deraadt # sparc kernel uses volatile, rather than heavy "device-driver"s.
     46  1.1  deraadt 
     47  1.1  deraadt NORMAL_C=	${CC} -c ${CFLAGS} ${PROF} $<
     48  1.1  deraadt NORMAL_C_C=	${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
     49  1.1  deraadt 
     50  1.1  deraadt # optimizer breaks sometimes; temporary workaround uses ${NOOPT_C}
     51  1.1  deraadt NOOPT_C=	${CC} -c ${COPTS} ${PROF} ${PARAM} $<
     52  1.1  deraadt 
     53  1.1  deraadt NORMAL_S=	rm -f $*.c; ln -s $< $*.c; \
     54  1.1  deraadt 		${CC} ${COPTS} -I${SPARC}/sparc -E $*.c > $*.i; \
     55  1.1  deraadt 		${AS} -o $@ $*.i; rm -f $*.c $*.i
     56  1.1  deraadt NORMAL_S_C=	rm -f $*.c; ln -s $< $*.c; \
     57  1.1  deraadt 		${CC} ${COPTS} ${PARAM} -I${SPARC}/sparc -E $*.c > $*.i; \
     58  1.1  deraadt 		${AS} -o $@ $*.i; rm -f $*.c $*.i
     59  1.1  deraadt 
     60  1.1  deraadt %OBJS
     61  1.1  deraadt 
     62  1.1  deraadt %CFILES
     63  1.1  deraadt 
     64  1.1  deraadt # load lines for config "xxx" will be emitted as:
     65  1.1  deraadt # xxx: ${SYSTEM_DEP} swapxxx.o
     66  1.1  deraadt #	${SYSTEM_LD_HEAD}
     67  1.1  deraadt #	${SYSTEM_LD} swapxxx.o
     68  1.1  deraadt #	${SYSTEM_LD_TAIL}
     69  1.1  deraadt DEBUG?=
     70  1.1  deraadt .if ${DEBUG} == "-g"
     71  1.1  deraadt LDX=-X
     72  1.1  deraadt .else
     73  1.1  deraadt LDX=-x
     74  1.1  deraadt .endif
     75  1.2  deraadt SYSTEM_OBJ=	locore.o ${OBJS} param.o ioconf.o
     76  1.1  deraadt SYSTEM_DEP=	Makefile ${SYSTEM_OBJ}
     77  1.1  deraadt SYSTEM_LD_HEAD=	rm -f $@
     78  1.1  deraadt SYSTEM_LD=	-@echo ${LD} ${LDX} -p -N -e start -T f8004000 -o $@ \
     79  1.1  deraadt 		    '$${SYSTEM_OBJ}' vers.o ${LIBKERN}; \
     80  1.1  deraadt 		${LD} ${LDX} -p -N -e start -T f8004000 -o $@ \
     81  1.2  deraadt 		    ${SYSTEM_OBJ} vers.o ${LIBKERN} \
     82  1.2  deraadt 		    /usr/local/lib/gcc-lib/sparc/2.4.5/libgcc.a
     83  1.1  deraadt SYSTEM_LD_TAIL=	@size $@; chmod 755 $@
     84  1.1  deraadt #.if ${DEBUG} == "-g"
     85  1.1  deraadt #SYSTEM_LD_TAIL+=; echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
     86  1.1  deraadt #		echo strip -d $@; strip -d $@
     87  1.1  deraadt #.endif
     88  1.1  deraadt 
     89  1.1  deraadt %LOAD
     90  1.1  deraadt 
     91  1.1  deraadt newvers:
     92  1.1  deraadt 	sh $S/conf/newvers.sh
     93  1.1  deraadt 	${CC} ${CFLAGS} -c vers.c
     94  1.1  deraadt 
     95  1.1  deraadt clean:
     96  1.2  deraadt 	rm -f eddep *netbsd netbsd.gdb tags tags1 *.[io] [a-z]*.s \
     97  1.1  deraadt 		Errs errs linterrs makelinks
     98  1.1  deraadt 
     99  1.1  deraadt locore.o: ${SPARC}/sparc/locore.s assym.s
    100  1.1  deraadt 	${NORMAL_S}
    101  1.1  deraadt 
    102  1.1  deraadt # depend on maxusers
    103  1.1  deraadt assym.s: Makefile
    104  1.1  deraadt 
    105  1.1  deraadt ./assym.s: assym.s
    106  1.1  deraadt assym.s: genassym
    107  1.1  deraadt 	./genassym >assym.s
    108  1.1  deraadt 
    109  1.1  deraadt genassym: genassym.o
    110  1.1  deraadt 	${CC} -o $@ genassym.o
    111  1.1  deraadt 
    112  1.1  deraadt genassym.o: ${SPARC}/sparc/genassym.c
    113  1.3  deraadt 	${CC} -c ${CFLAGS} -I/tmp/usr/include -I/usr/include ${PARAM} $<
    114  1.1  deraadt 
    115  1.2  deraadt SRCS=	${CFILES} ${SPARC}/sparc/genassym.c ioconf.c param.c ${SPARC}/sparc/conf.c
    116  1.1  deraadt depend: .depend
    117  1.2  deraadt .depend: ${SRCS}
    118  1.1  deraadt 	mkdep ${COPTS} ${SRCS}
    119  1.1  deraadt 
    120  1.1  deraadt links:
    121  1.1  deraadt 	egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
    122  1.1  deraadt 	  sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
    123  1.1  deraadt 	echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
    124  1.1  deraadt 	  sort -u | comm -23 - dontlink | \
    125  1.1  deraadt 	  sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
    126  1.1  deraadt 	sh makelinks && rm -f dontlink
    127  1.1  deraadt 
    128  1.1  deraadt tags: depend
    129  1.1  deraadt 	sh $S/conf/systags.sh
    130  1.1  deraadt 	rm -f tags1
    131  1.1  deraadt 	sed -e 's,	../,	,' tags > tags1
    132  1.1  deraadt 
    133  1.1  deraadt ioconf.o: ioconf.c
    134  1.1  deraadt 	${CC} -c ${CFLAGS} ioconf.c
    135  1.1  deraadt 
    136  1.1  deraadt param.c: $S/conf/param.c
    137  1.1  deraadt 	rm -f param.c
    138  1.1  deraadt 	cp $S/conf/param.c .
    139  1.1  deraadt 
    140  1.1  deraadt param.o: param.c Makefile
    141  1.1  deraadt 	${CC} -c ${CFLAGS} ${PARAM} param.c
    142  1.1  deraadt 
    143  1.2  deraadt #vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
    144  1.2  deraadt #	sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
    145  1.2  deraadt #vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
    146  1.2  deraadt #	sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
    147  1.1  deraadt 
    148  1.1  deraadt %RULES
    149