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