source: freewrt/mk/kpkg.mk@ 337b581

Last change on this file since 337b581 was b4e4107, checked in by Thorsten Glaser <tg@…>, 19 years ago

I'm fed up with this sh!t, if people are too stupid to write build
systems I'll be too lazy to fix them if it gets on my nerves like
that annoying, e.g. the alsa breakage, let's just have ld(1) parse
-Wl,-foo instead (but not -Wl,-foo,bar which we don't use)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2212 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.3 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include ${TOPDIR}/mk/targets.mk
8
9KERNEL_C_INCS:= 0
10
11ifeq (${CPU_ARCH},i386)
12KERNEL_C_INCS:= -I${LINUX_DIR}/include/asm-i386/mach-generic \
13 -I${LINUX_DIR}/include/asm-i386/mach-default
14KERNEL_C_OPTS:= -Os -march=i486 -mpreferred-stack-boundary=2 \
15 -fno-unit-at-a-time
16endif
17
18ifeq (${CPU_ARCH},mipsel)
19KERNEL_C_INCS:= -I${LINUX_DIR}/include/asm-mips/mach-generic
20KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -mabi=32 \
21 -finline-limit=100000 -march=mips32 -Wa,-32 \
22 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
23endif
24
25ifeq ($(strip ${KERNEL_C_INCS}),0)
26$(error kernel architecture invalid)
27endif
28
29KERNEL_M_OPTS:= -D__KERNEL__ -DMODULE -fno-strict-aliasing -fno-common \
30 -fomit-frame-pointer -Wstrict-prototypes -Wno-trigraphs \
31 -nostdinc -I. -iwithprefix include \
32 -I${LINUX_DIR}/include -I${LINUX_DIR}/include/asm/gcc
33ifeq (${CPU_ARCH},mipsel)
34KERNEL_M_OPTS+= -mlong-calls
35endif
36
37TCPPFLAGS+= ${KERNEL_C_INCS}
38TCFLAGS+= ${KERNEL_C_OPTS}
39XAKE_FLAGS+= ARCH="${KERNEL_ARCH}" \
40 CROSS_COMPILE="${TARGET_CROSS}" \
41 c_opts="${KERNEL_C_OPTS}" \
42 KERNELVERSION="${KERNEL}"
Note: See TracBrowser for help on using the repository browser.