The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/Makefile.pc98

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 # Makefile for FreeBSD(98) after:
    2 #
    3 # Makefile.i386 -- with config changes.
    4 # Copyright 1990 W. Jolitz
    5 #       from: @(#)Makefile.i386 7.1 5/10/91
    6 # $FreeBSD: stable/4/sys/conf/Makefile.pc98 118807 2003-08-12 02:17:25Z nyan $
    7 #
    8 # Makefile for FreeBSD
    9 #
   10 # This makefile is constructed from a machine description:
   11 #       config machineid
   12 # Most changes should be made in the machine description
   13 #       /sys/pc98/conf/``machineid''
   14 # after which you should do
   15 #        config machineid
   16 # Generic makefile changes should be made in
   17 #       /sys/conf/Makefile.pc98
   18 # after which config should be rerun for all machines.
   19 #
   20 
   21 # Which version of config(8) is required.
   22 %VERSREQ=       400019
   23 
   24 # Can be overridden by makeoptions or /etc/make.conf
   25 KERNEL?=        kernel
   26 #STD8X16FONT?=  iso
   27 
   28 .if !defined(S)
   29 .if exists(./@/.)
   30 S=      ./@
   31 .else
   32 S=      ../..
   33 .endif
   34 .endif
   35 M=      ${MACHINE_ARCH}
   36 
   37 SIZE?=          size
   38 OBJCOPY?=       objcopy
   39 
   40 COPTFLAGS?=-O -pipe
   41 .if !defined(NO_CPU_COPTFLAGS)
   42 COPTFLAGS+= ${_CPUCFLAGS}
   43 .endif
   44 INCLUDES= -nostdinc -I- -I. -I$S
   45 # This hack is to allow kernel compiles to succeed on machines w/out srcdist
   46 .if exists($S/../include)
   47 INCLUDES+= -I$S/../include
   48 .else
   49 INCLUDES+= -I/usr/include
   50 .endif
   51 
   52 # This hack lets us use the ipfilter code without spamming a new
   53 # include path into 100+ source files.
   54 INCLUDES+= -I$S/contrib/ipfilter
   55 
   56 COPTS=  ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
   57 CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
   58 
   59 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
   60 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
   61 
   62 DEFINED_PROF=   ${PROF}
   63 .if defined(PROF)
   64 CFLAGS+=        -malign-functions=4
   65 .if ${PROFLEVEL} >= 2
   66 IDENT+= -DGPROF4 -DGUPROF
   67 PROF+=  -mprofiler-epilogue
   68 .endif
   69 .endif
   70 
   71 # Put configuration-specific C flags last (except for ${PROF}) so that they
   72 # can override the others.
   73 CFLAGS+=        ${CONF_CFLAGS}
   74 
   75 NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
   76 NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
   77 NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC}
   78 PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC}
   79 
   80 GEN_CFILES= $S/$M/$M/genassym.c
   81 # setdef0.c and setdef1.c are intentionally
   82 # omitted from SYSTEM_CFILES.  They include setdefs.h, a header which
   83 # is generated from all of ${OBJS}.  We don't want to have to compile
   84 # everything just to do a make depend.
   85 SYSTEM_CFILES= ioconf.c vnode_if.c config.c
   86 SYSTEM_SFILES= $S/$M/$M/locore.s
   87 SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
   88 SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o config.o \
   89         setdef1.o hack.So
   90 SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \
   91         -export-dynamic -dynamic-linker /red/herring \
   92         -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
   93 SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
   94         ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
   95 SYSTEM_DEP+= $S/conf/ldscript.$M
   96 
   97 %BEFORE_DEPEND
   98 
   99 %OBJS
  100 
  101 %CFILES
  102 
  103 %SFILES
  104 
  105 %MFILES
  106 
  107 %CLEAN
  108 
  109 .PHONY: all modules
  110 
  111 all: ${KERNEL}
  112 
  113 depend: kernel-depend
  114 clean:  kernel-clean
  115 cleandepend:  kernel-cleandepend
  116 tags:  kernel-tags
  117 install install.debug: kernel-install
  118 reinstall reinstall.debug: kernel-reinstall
  119 
  120 .if !defined(DEBUG)
  121 FULLKERNEL=     ${KERNEL}
  122 .else
  123 FULLKERNEL=     ${KERNEL}.debug
  124 ${KERNEL}: ${FULLKERNEL}
  125         ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL}
  126 .endif
  127 
  128 ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
  129         @rm -f ${.TARGET}
  130         @echo linking ${.TARGET}
  131         ${SYSTEM_LD}
  132         ${SYSTEM_LD_TAIL}
  133 
  134 .if !exists(.depend)
  135 ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
  136 .endif
  137 
  138 kernel-clean:
  139         rm -f *.o *.so *.So *.ko *.s eddep errs \
  140               ${FULLKERNEL} ${KERNEL} linterrs makelinks \
  141               setdef[01].c setdefs.h tags \
  142               vers.c vnode_if.c vnode_if.h ${CLEAN}
  143 
  144 #lint: /tmp
  145 #       @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
  146 #         $S/$M/$M/Locore.c ${CFILES} ioconf.c | \
  147 #           grep -v 'struct/union .* never defined' | \
  148 #           grep -v 'possible pointer alignment problem'
  149 
  150 locore.o: $S/$M/$M/locore.s assym.s
  151         ${NORMAL_S}
  152 
  153 # This is a hack.  BFD "optimizes" away dynamic mode if there are no
  154 # dynamic references.  We could probably do a '-Bforcedynamic' mode like
  155 # in the a.out ld.  For now, this works.
  156 hack.So: Makefile
  157         touch hack.c
  158         ${CC} -shared -nostdlib hack.c -o hack.So
  159         rm -f hack.c
  160 
  161 .ORDER: setdefs.h setdef0.c setdef1.c
  162 
  163 setdef0.o: setdef0.c setdefs.h
  164         ${NORMAL_C}
  165 
  166 setdef1.o: setdef1.c setdefs.h
  167         ${NORMAL_C}
  168 
  169 setdef0.c setdef1.c setdefs.h: ${OBJS}
  170         @gensetdefs ${OBJS}
  171 
  172 # this rule stops ./assym.s in .depend from causing problems
  173 ./assym.s: assym.s
  174 
  175 assym.s: $S/kern/genassym.sh genassym.o
  176         sh $S/kern/genassym.sh genassym.o > ${.TARGET}
  177 
  178 genassym.o: $S/$M/$M/genassym.c
  179         rm -f ./machine ; ln -s $S/$M/include ./machine
  180         ${CC} -c ${CFLAGS} $S/$M/$M/genassym.c
  181 
  182 ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
  183 
  184 # The argument list can be very long, use make -V and xargs to
  185 # pass it to mkdep.
  186 kernel-depend: assym.s vnode_if.h ${BEFORE_DEPEND} \
  187             ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} ${SYSTEM_SFILES}
  188         rm -f .newdep
  189         ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | xargs \
  190                 mkdep -a -f .newdep ${CFLAGS}
  191         ${MAKE} -V SFILES -V SYSTEM_SFILES | xargs \
  192             env MKDEP_CPP="${CC} -E" mkdep -a -f .newdep ${ASM_CFLAGS}
  193         rm -f .depend
  194         mv -f .newdep .depend
  195 
  196 kernel-cleandepend:
  197         rm -f .depend
  198 
  199 links:
  200         egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
  201           sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
  202         ${MAKE} -V CFILES | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
  203           sort -u | comm -23 - dontlink | \
  204           sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
  205         sh makelinks && rm -f dontlink
  206 
  207 kernel-tags:
  208         @[ -f .depend ] || { echo "you must make depend first"; exit 1; }
  209         sh $S/conf/systags.sh
  210         rm -f tags1
  211         sed -e 's,      ../,    ,' tags > tags1
  212 
  213 kernel-install kernel-install.debug:
  214         @if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
  215                 echo "You must build a kernel first." ; \
  216                 exit 1 ; \
  217         fi
  218 .if exists(${DESTDIR}/${KERNEL})
  219         -chflags noschg ${DESTDIR}/${KERNEL}
  220         mv ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
  221 .endif
  222         ${INSTALL} -m 555 -o root -g wheel -fschg \
  223                 ${KERNEL}${.TARGET:S/kernel-install//} ${DESTDIR}/${KERNEL}
  224 
  225 kernel-reinstall kernel-reinstall.debug:
  226         ${INSTALL} -m 555 -o root -g wheel -fschg \
  227                 ${KERNEL}${.TARGET:S/kernel-reinstall//} ${DESTDIR}/${KERNEL}
  228 
  229 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
  230 all:    modules
  231 depend: modules-depend
  232 clean:  modules-clean
  233 cleandepend:  modules-cleandepend
  234 cleandir:  modules-cleandir
  235 tags:  modules-tags
  236 install install.debug: modules-install
  237 reinstall reinstall.debug: modules-reinstall
  238 .endif
  239 
  240 MKMODULESENV=   MAKEOBJDIRPREFIX=${.OBJDIR}/modules
  241 MKMODULESENV+=  COPTS="-include ${.OBJDIR}/opt_global.h"
  242 .if defined(MODULES_OVERRIDE)
  243 MKMODULESENV+=  MODULES_OVERRIDE="${MODULES_OVERRIDE}"
  244 .endif
  245 .if defined(DEBUG)
  246 MKMODULESENV+=  DEBUG="${DEBUG}" DEBUG_FLAGS="${DEBUG}"
  247 .endif
  248 MKMODULESENV+=  MACHINE=pc98
  249 
  250 modules:
  251         @mkdir -p ${.OBJDIR}/modules
  252         cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \
  253             env ${MKMODULESENV} ${MAKE} all
  254 
  255 modules-depend:
  256         @mkdir -p ${.OBJDIR}/modules
  257         cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \
  258             env ${MKMODULESENV} ${MAKE} depend
  259 
  260 modules-clean:
  261         cd $S/modules ; env ${MKMODULESENV} ${MAKE} clean
  262 
  263 modules-cleandepend:
  264         cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandepend
  265 
  266 modules-clobber:        modules-clean
  267         rm -rf ${MKMODULESENV}
  268 
  269 modules-cleandir:
  270         cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandir
  271 
  272 modules-tags:
  273         cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags
  274 
  275 modules-install modules-install.debug:
  276 .if !defined(NO_MODULES_OLD)
  277         if [ -d ${DESTDIR}/modules -a -n "`ls ${DESTDIR}/modules`" ]; then \
  278                 mkdir -p ${DESTDIR}/modules.old; \
  279                 cp -p ${DESTDIR}/modules/* ${DESTDIR}/modules.old; \
  280         fi;
  281 .endif
  282         cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
  283 
  284 modules-reinstall modules-reinstall.debug:
  285         cd $S/modules ; env ${MKMODULESENV} ${MAKE} install
  286 
  287 config.o:
  288         ${NORMAL_C}
  289 
  290 ioconf.o:
  291         ${NORMAL_C}
  292 
  293 vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
  294         sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
  295 
  296 # XXX strictly, everything depends on Makefile because changes to ${PROF}
  297 # only appear there, but we don't handle that.
  298 vers.o:
  299         ${NORMAL_C}
  300 
  301 vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src
  302         perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src
  303 
  304 vnode_if.h: $S/kern/vnode_if.pl $S/kern/vnode_if.src
  305         perl5 $S/kern/vnode_if.pl -h $S/kern/vnode_if.src
  306 
  307 vnode_if.o:
  308         ${NORMAL_C}
  309 
  310 # Commented out for now pending a better solution.
  311 # How do we pick up compiler version specific flags??
  312 #.if exists($S/../share/mk)
  313 #.include "$S/../share/mk/bsd.kern.mk"
  314 #.else
  315 .include <bsd.kern.mk>
  316 #.endif
  317 
  318 %RULES
  319 
  320 # DO NOT DELETE THIS LINE -- make depend uses it

Cache object: ccc187916ae00851d8f2fa900eb31816


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.