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