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

Cache object: e804f99ecd890fde09f89c66b64e0a0c


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