source: freewrt/mk/kpkg.mk@ efd2732

Last change on this file since efd2732 was 8a670c8, checked in by Waldemar Brodkorb <wbx@…>, 18 years ago

add xscale stuff

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

  • Property mode set to 100644
File size: 1.4 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 (${CPU_ARCH},armeb)
26KERNEL_C_INCS:= -I${LINUX_DIR}/include/asm-arm/mach-generic
27KERNEL_C_OPTS:= -Os -fno-pic -finline-limit=100000 -march=armv5te
28endif
29
30ifeq ($(strip ${KERNEL_C_INCS}),0)
31$(error kernel architecture invalid)
32endif
33
34KERNEL_M_OPTS:= -D__KERNEL__ -DMODULE -fno-strict-aliasing -fno-common \
35 -fomit-frame-pointer -Wstrict-prototypes -Wno-trigraphs \
36 -nostdinc -I. -iwithprefix include \
37 -I${LINUX_DIR}/include -I${LINUX_DIR}/include/asm/gcc
38ifeq (${CPU_ARCH},mipsel)
39KERNEL_M_OPTS+= -mlong-calls
40endif
41
42TCPPFLAGS+= ${KERNEL_C_INCS}
43TCFLAGS+= ${KERNEL_C_OPTS}
44XAKE_FLAGS+= ARCH="${KERNEL_ARCH}" \
45 CROSS_COMPILE="${TARGET_CROSS}" \
46 c_opts="${KERNEL_C_OPTS}" \
47 KERNELVERSION="${KERNEL}"
Note: See TracBrowser for help on using the repository browser.