2001-11-02 21:34:20 +00:00
|
|
|
# $FreeBSD$
|
2003-11-05 12:20:16 +00:00
|
|
|
|
|
|
|
# Part of a unified Makefile for building kernels. This part contains all
|
|
|
|
# of the definitions that need to be before %BEFORE_DEPEND.
|
2001-11-02 21:34:20 +00:00
|
|
|
|
|
|
|
# Can be overridden by makeoptions or /etc/make.conf
|
|
|
|
KERNEL_KO?= kernel
|
|
|
|
KERNEL?= kernel
|
|
|
|
KODIR?= /boot/${KERNEL}
|
|
|
|
|
|
|
|
M= ${MACHINE_ARCH}
|
|
|
|
|
2002-03-01 01:21:29 +00:00
|
|
|
AWK?= awk
|
2003-06-14 17:28:13 +00:00
|
|
|
LINT?= lint
|
2001-11-02 21:34:20 +00:00
|
|
|
NM?= nm
|
|
|
|
OBJCOPY?= objcopy
|
|
|
|
SIZE?= size
|
|
|
|
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
.if ${CC} == "icc"
|
|
|
|
COPTFLAGS?=-O
|
|
|
|
.else
|
2004-03-19 16:36:29 +00:00
|
|
|
. if ${MACHINE_ARCH} == "amd64"
|
|
|
|
COPTFLAGS?=-O2 -frename-registers -pipe
|
2004-03-21 05:10:34 +00:00
|
|
|
. elif ${MACHINE_ARCH} == "ia64"
|
|
|
|
COPTFLAGS?=-O2 -pipe
|
2004-03-19 16:36:29 +00:00
|
|
|
. else
|
2001-11-02 21:34:20 +00:00
|
|
|
COPTFLAGS?=-O -pipe
|
2004-03-19 16:36:29 +00:00
|
|
|
. endif
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. if ${COPTFLAGS:M-O[23s]} != ""
|
2004-01-22 10:01:47 +00:00
|
|
|
COPTFLAGS+= -fno-strict-aliasing
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. endif
|
2004-01-22 10:01:47 +00:00
|
|
|
.endif
|
2001-11-02 21:34:20 +00:00
|
|
|
.if !defined(NO_CPU_COPTFLAGS)
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. if ${CC} == "icc"
|
|
|
|
COPTFLAGS+= ${_ICC_CPUCFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/}
|
|
|
|
. else
|
2001-11-02 21:34:20 +00:00
|
|
|
COPTFLAGS+= ${_CPUCFLAGS}
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.if ${CC} == "icc"
|
|
|
|
NOSTDINC= -X
|
|
|
|
.else
|
|
|
|
NOSTDINC= -nostdinc
|
2001-11-02 21:34:20 +00:00
|
|
|
.endif
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
|
|
|
|
INCLUDES= ${NOSTDINC} -I- ${INCLMAGIC} -I. -I$S
|
2001-11-02 21:34:20 +00:00
|
|
|
|
2004-03-14 01:29:05 +00:00
|
|
|
# This hack lets us use the Intel ACPICA code without spamming a new
|
2001-11-02 21:34:20 +00:00
|
|
|
# include path into 100+ source files.
|
|
|
|
INCLUDES+= -I$S/contrib/dev/acpica
|
|
|
|
|
|
|
|
# ... and the same for ipfilter
|
|
|
|
INCLUDES+= -I$S/contrib/ipfilter
|
|
|
|
|
2004-02-26 03:53:54 +00:00
|
|
|
# ... and the same for pf
|
|
|
|
INCLUDES+= -I$S/contrib/pf
|
|
|
|
|
2003-06-25 14:51:20 +00:00
|
|
|
# ... and the same for Atheros HAL
|
|
|
|
INCLUDES+= -I$S/contrib/dev/ath -I$S/contrib/dev/ath/freebsd
|
|
|
|
|
2003-10-27 11:19:08 +00:00
|
|
|
# ... and the same for the NgATM stuff
|
|
|
|
INCLUDES+= -I$S/contrib/ngatm
|
|
|
|
|
2002-07-13 22:28:34 +00:00
|
|
|
COPTS= ${INCLUDES} -D_KERNEL -include opt_global.h
|
2003-11-05 12:20:16 +00:00
|
|
|
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
.if ${CC} != "icc"
|
2004-01-22 10:01:47 +00:00
|
|
|
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
|
2003-11-05 12:20:16 +00:00
|
|
|
WERROR?= -Werror
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
.endif
|
2001-11-02 21:34:20 +00:00
|
|
|
|
|
|
|
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
|
|
|
|
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
|
|
|
|
|
2002-07-13 19:36:14 +00:00
|
|
|
.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1
|
2004-03-14 01:29:05 +00:00
|
|
|
.if ${CC} == "icc"
|
|
|
|
.error Profiling doesn't work with ICC yet.
|
|
|
|
.else
|
2002-07-13 22:28:34 +00:00
|
|
|
CFLAGS+= -DGPROF -falign-functions=16
|
2004-03-14 01:29:05 +00:00
|
|
|
.endif
|
2001-11-02 21:34:20 +00:00
|
|
|
.if ${PROFLEVEL} >= 2
|
2002-07-13 22:28:34 +00:00
|
|
|
CFLAGS+= -DGPROF4 -DGUPROF
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. if ${CC} == "icc"
|
|
|
|
# XXX doesn't work yet
|
|
|
|
#PROF= -prof_gen
|
|
|
|
. else
|
2003-12-30 09:01:29 +00:00
|
|
|
PROF= -finstrument-functions
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. endif
|
2002-07-13 22:28:34 +00:00
|
|
|
.else
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. if ${CC} == "icc"
|
|
|
|
PROF= -p
|
|
|
|
. else
|
2002-07-13 22:28:34 +00:00
|
|
|
PROF= -pg
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
. endif
|
2001-11-02 21:34:20 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
2002-07-13 22:28:34 +00:00
|
|
|
DEFINED_PROF= ${PROF}
|
2002-02-20 23:35:56 +00:00
|
|
|
|
2001-11-02 21:34:20 +00:00
|
|
|
# Put configuration-specific C flags last (except for ${PROF}) so that they
|
|
|
|
# can override the others.
|
|
|
|
CFLAGS+= ${CONF_CFLAGS}
|
|
|
|
|
2003-06-14 17:28:13 +00:00
|
|
|
# Optional linting. This can be overridden in /etc/make.conf.
|
|
|
|
LINTFLAGS= ${LINTOBJKERNFLAGS}
|
|
|
|
|
2002-02-20 23:35:56 +00:00
|
|
|
NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
|
|
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
|
|
|
|
PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}
|
2002-10-19 22:24:43 +00:00
|
|
|
NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
|
2001-11-02 21:34:20 +00:00
|
|
|
|
2002-10-19 16:47:13 +00:00
|
|
|
NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
|
|
|
|
${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
|
2001-11-02 21:34:20 +00:00
|
|
|
|
2003-06-14 17:28:13 +00:00
|
|
|
NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
|
|
|
|
|
2001-11-02 21:34:20 +00:00
|
|
|
GEN_CFILES= $S/$M/$M/genassym.c
|
2003-02-28 21:59:14 +00:00
|
|
|
SYSTEM_CFILES= config.c env.c hints.c majors.c vnode_if.c
|
2001-11-02 21:34:20 +00:00
|
|
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
2003-02-28 21:59:14 +00:00
|
|
|
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
|
|
|
|
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
|
|
|
|
SYSTEM_OBJS+= hack.So
|
2003-12-29 11:34:33 +00:00
|
|
|
SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \
|
2002-01-10 03:52:01 +00:00
|
|
|
-warn-common -export-dynamic -dynamic-linker /red/herring \
|
2001-11-02 21:34:20 +00:00
|
|
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
|
|
|
SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
|
2003-12-29 11:34:33 +00:00
|
|
|
${SIZE} ${.TARGET} ; chmod 755 ${.TARGET}
|
2001-11-02 21:34:20 +00:00
|
|
|
SYSTEM_DEP+= $S/conf/ldscript.$M
|
|
|
|
|
2002-01-05 06:21:06 +00:00
|
|
|
# MKMODULESENV is set here so that port makefiles can augment
|
|
|
|
# them.
|
|
|
|
|
|
|
|
MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
|
2002-02-17 21:00:20 +00:00
|
|
|
.if (${KERN_IDENT} == LINT)
|
|
|
|
MKMODULESENV+= ALL_MODULES=LINT
|
|
|
|
.endif
|
2002-01-05 06:21:06 +00:00
|
|
|
.if defined(MODULES_OVERRIDE)
|
|
|
|
MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}"
|
|
|
|
.endif
|
|
|
|
.if defined(DEBUG)
|
2004-02-13 10:40:54 +00:00
|
|
|
MKMODULESENV+= DEBUG_FLAGS="${DEBUG}"
|
2002-01-05 06:21:06 +00:00
|
|
|
.endif
|