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/template.mk.bnr

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #
    2 # Mach Operating System
    3 # Copyright (c) 1993 Carnegie Mellon University
    4 # All Rights Reserved.
    5 # 
    6 # Permission to use, copy, modify and distribute this software and its
    7 # documentation is hereby granted, provided that both the copyright
    8 # notice and this permission notice appear in all copies of the
    9 # software, derivative works or modified versions, and any portions
   10 # thereof, and that both notices appear in supporting documentation.
   11 # 
   12 # CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13 # CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14 # ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15 # 
   16 # Carnegie Mellon requests users of this software to return to
   17 # 
   18 #  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19 #  School of Computer Science
   20 #  Carnegie Mellon University
   21 #  Pittsburgh PA 15213-3890
   22 # 
   23 # any improvements or extensions that they make and grant Carnegie Mellon
   24 # the rights to redistribute these changes.
   25 #  
   26 #
   27 # HISTORY
   28 # $Log: template.mk.bnr,v $
   29 # Revision 2.4  93/08/10  15:46:15  mrt
   30 #       /usr/include/machine/types.h defines vm_offset_t and vm_size_t
   31 #       this causes us conflicts.  So substitute in our own types.h:
   32 #               ln -s ../mach/machine/vm_types.h ${IHDR}machine/types.h
   33 #       [93/08/05  12:09:04  rvb]
   34 # 
   35 # Revision 2.3  93/05/17  17:12:13  rvb
   36 #       Flush version.minor
   37 # 
   38 # Revision 2.2  93/05/10  17:45:53  rvb
   39 #       Revised for bsdss
   40 #       [93/05/04  16:57:58  rvb]
   41 # 
   42 
   43 .SUFFIXES:
   44 .SUFFIXES: .c .S .b .o .h .defs .sh
   45 .if     defined(MACH_SRC)
   46 PATH    !=../../util/shadow_path ${.CURDIR} ${MACH_SRC:S/$/\/kernel/g} -p \
   47                 chips conf ddb device ipc kern mach mach_debug sys vm \
   48                 intel i386at ${MACHINE} mach/${MACHINE} scsi
   49 #               chips conf ddb device ipc kern mach mach_debug man scsi sys vm
   50 #               intel i386at ${MACHINE} mach/${MACHINE}
   51 #               alpha emul i386 i386at i386ipsc i386ps2 i860
   52 #               i860ipsc i860oki intel ipsc luna88k luna88kdev luna88kif m88k
   53 #               mac2 mac2dev mac2extra mac2if mac2os
   54 #               mips mon motorola norma pixrect sbusdev
   55 #               sqt sqtconf sqtmbad sqtsec sqtzdc
   56 #               sun sun3 sun4 sundev sunif
   57 #               vax vaxif vaxmba vaxuba
   58 .PATH: ${PATH}
   59 ISRC=  -I${.CURDIR} ${MACH_SRC:S/^/-I/g:S/$/\/kernel/g} 
   60 .else
   61 ISRC=  -I${.CURDIR}
   62 .endif
   63 
   64 .PRECIOUS: Makefile
   65 
   66 DEFINES         = -DMACH -DCMU
   67 IDIR            = -I. ${ISRC} -I../../include
   68 ALLOPTS         = ${IDENT} -DKERNEL ${DEFINES} ${IDIR}
   69 LINTOPTS        = ${ALLOPTS}
   70 
   71 CFLAGS          = -O ${DEPFLAG} ${MYFLAGS} ${ALLOPTS} -c
   72 .if defined(PROFILING)
   73 CFLAGS          +=-DGPROF
   74 .endif
   75 CFLAGS_NORMAL   = ${CFLAGS}
   76 CFLAGS_DRIVER   = ${CFLAGS}
   77 CFLAGS_PROFIL   = ${CFLAGS}
   78 DECODE          = uudecode
   79 
   80 MACH_MIG        ?= ../../mig/mig
   81 #MACH_MIGFLAGS  ?= -DKERNEL ${IDENT} ${DEFINES} ${IDIR}
   82 MACH_MIGFLAGS   ?= -DKERNEL ${IDIR}
   83 
   84 MACH_KERNEL     ?= ../../mach_servers/mach_kernel
   85 MACH_LD         ?= ../../binutils/ldx
   86 MACH_LDFLAGS    ?= -e _pstart -T ${TEXTORG}
   87 
   88 MACH_XSTRIP     ?= ../../xstrip/xstrip
   89 
   90 
   91 
   92 
   93 
   94 all: dirs includes netbsd ${MACH_KERNEL}
   95 
   96 dirs:
   97         -@[ -d device ] || mkdir device
   98         -@[ -d mach ] || mkdir mach
   99         -@[ -d mach_debug ] || mkdir mach_debug
  100         -@[ -d mach/i386 ] || mkdir mach/i386
  101 
  102 #               i386/cpu.h
  103 #               i386/syscall_sw.h
  104 #               i386/thread_status.h
  105 
  106 INCLUDES=
  107 %IFILES
  108 
  109 IHDR    = ../../include/
  110 includes: ${INCLUDES:S/^/${IHDR}/g}
  111 ${INCLUDES:S/^/${IHDR}/g}: ${.TARGET:S/^${IHDR}//}
  112         /bin/rm -f ${.TARGET}
  113         /bin/cp -p ${.OODATE} ${.TARGET}
  114 
  115 netbsd:
  116 .if     exists(/usr/include/machine/types.h)
  117 . if    !exists(${IHDR}machine/types.h)
  118         rm -f ${IHDR}machine/types.h
  119         ln -s ../mach/machine/vm_types.h ${IHDR}machine/types.h
  120 . endif
  121 .endif
  122 
  123 #
  124 #  These macros are filled in by the config program depending on the
  125 #  current configuration.  The MACHDEP macro is replaced by the
  126 #  contents of the machine dependent makefile template and the others
  127 #  are replaced by the corresponding symbol definitions for the
  128 #  configuration.
  129 #
  130 
  131 %OBJS
  132 
  133 %CFILES
  134 
  135 %SFILES
  136 
  137 %BFILES
  138 
  139 %ORDERED
  140 
  141 %RULES
  142 #  All macro definitions should be before this point,
  143 #  so that the machine dependent fragment can redefine the macros.
  144 #  All rules (that use macros) should be after this point,
  145 #  so that they pick up any redefined macro values.
  146 
  147 %MACHDEP
  148 
  149 #
  150 # The machine dependent template.mk may define the load flags
  151 # so this is only a default value.
  152 
  153 vers.c: ${OBJS} conf/newvers.sh
  154         sh ${.ALLSRC:M*.sh} \
  155                 ${.ALLSRC:M*sh:H}/copyright \
  156                 `cat ${.ALLSRC:M*.sh:H}/version.major \
  157                      ${.ALLSRC:M*.sh:H}/version.variant \
  158                      ${.ALLSRC:M*.sh:H}/version.edit \
  159                      ${.ALLSRC:M*.sh:H}/version.patch`
  160         ${CC} ${CFLAGS_NORMAL} vers.c
  161 
  162 
  163 ${MACH_KERNEL}: vers.o
  164         @echo loading ${.TARGET}
  165         ${MACH_LD} ${MACH_LDFLAGS} -o ${.TARGET} ${OBJS} vers.o -z 
  166         @echo xstripping ${.TARGET}
  167         -${MACH_XSTRIP} -x ${.TARGET}
  168 
  169 
  170 HOST_INCDIRS    = ${INCDIRS}
  171 HOST_CFLAGS     = ${VOLATILE} ${IDENT} ${DEFINES}
  172 HOST_LDFLAGS    = ${MACH_LDFLAGS}
  173 HOST_CC         ?= ${CC}
  174 _host_LPATH_    ?= ${LPATH}
  175 
  176 xxx_genassym.c: i386/genassym.c
  177         ${CC} -E ${CFLAGS}  ${.ALLSRC:M*.c} > xxx_genassym.c
  178         cat /dev/null >> genassym.d
  179         sed 's/^genassym\.o/xxx_genassym.c/' genassym.d > xxx_genassym.c.d;
  180         /bin/rm -f genassym.d
  181 genassym: xxx_genassym.c
  182         ( LPATH="${_host_LPATH_}"; export LPATH; \
  183          ${HOST_CC}  ${ALLOPTS} -o  genassym.X xxx_genassym.c )
  184         /bin/mv genassym.X genassym
  185 
  186 #
  187 #  Special dependencies for locore.
  188 #
  189 
  190 assym.s: genassym
  191         ./genassym > ${.TARGET}
  192 
  193 locore.o: assym.s ${LOCORE_HEADS}
  194 
  195 vm_pageout.o: mach/memory_object_user.h mach/memory_object_default.h
  196 vm_object.o: mach/memory_object_user.h mach/memory_object_default.h
  197 vm_fault.o: mach/memory_object_user.h
  198 memory_object.o: mach/memory_object_user.h
  199 exception.o: mach/exc.h
  200 dev_pager.o : device/device_pager_server.c mach/mach_user_kernel.h
  201 ds_routines.o : device/device_reply.h
  202 
  203 ############################################################################
  204 MACH_KU_FFILES = \
  205         mach/memory_object_data_provided.c mach/memory_object_data_unavailable.c \
  206         mach/memory_object_data_error.c mach/memory_object_set_attributes.c \
  207         mach/memory_object_data_supply.c mach/memory_object_ready.c \
  208         mach/memory_object_change_attributes.c
  209 
  210 #
  211 # MIG user interfaces
  212 #
  213 mach/exc.h: mach/exc.defs
  214         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_USER  -header mach/exc.h  -user /dev/null  -server /dev/null \
  215         ${.ALLSRC:M*.defs}
  216 
  217 device/device_reply.h device/device_reply_user.c: device/device_reply.defs
  218         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_USER  -header device/device_reply.h  -user device/device_reply_user.c \
  219         -server /dev/null ${.ALLSRC:M*.defs}
  220 
  221 ${MACH_KU_FFILES} mach/mach_user_kernel.h: mach/mach.defs
  222         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_USER  -header mach/mach_user_kernel.h -i mach/ -user '$(MACH_KU_FFILES)' \
  223         -server /dev/null ${.ALLSRC:M*.defs}
  224 
  225 mach/memory_object_default.h mach/memory_object_default_user.c: mach/memory_object_default.defs
  226         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_USER -DSEQNOS  -header mach/memory_object_default.h  -user mach/memory_object_default_user.c  \
  227         -server /dev/null ${.ALLSRC:M*.defs}
  228 
  229 mach/memory_object_user.h mach/memory_object_user.c: mach/memory_object.defs
  230         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_USER -DSEQNOS  -header mach/memory_object_user.h  -user mach/memory_object_user.c \
  231          -server /dev/null ${.ALLSRC:M*.defs}
  232 
  233 #
  234 # MACH_MIG kernel interrfaces; server code only.
  235 #
  236 mach/mach_server.c: mach/mach.defs
  237         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  238                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  239 
  240 mach/mach4_server.c: mach/mach4.defs
  241         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  242                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  243 
  244 mach/mach_host_server.c: mach/mach_host.defs
  245         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  246                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  247 
  248 mach/mach_port_server.c: mach/mach_port.defs
  249         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  250                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  251 
  252 device/device_pager_server.c: mach/memory_object.defs
  253         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  254                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  255 
  256 mach_debug/mach_debug_server.c: mach_debug/mach_debug.defs
  257         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user /dev/null \
  258                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  259 
  260 device/device_server.c: device/device.defs
  261         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user   /dev/null \
  262                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  263 
  264 mach/i386/mach_i386_server.c: mach/i386/mach_i386.defs
  265         ${MACH_MIG} ${MACH_MIGFLAGS} -DKERNEL_SERVER  -header /dev/null  -user   /dev/null \
  266                 -server ${.TARGET} ${.ALLSRC:M*.defs}
  267 ############################################################################
  268 
  269 .if exists(depend.mk)
  270 .include "depend.mk"
  271 .endif
  272 
  273 clean:
  274         rm -f ${OBJS} ${MACH_KERNEL} core
  275         rm -f vers.o vers.c
  276         rm -f genassym xxx_genassym.c xxx_genassym.c.d
  277         rm -f device_pager_server.o
  278 
  279 
  280 
  281 

Cache object: 0cb6e1b38a45726d1d47bdbcfc4ded49


[ 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.