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