73d4c99d78
This is upgrading code as-is. The build will fail. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
128 lines
4.1 KiB
Makefile
128 lines
4.1 KiB
Makefile
#
|
|
# Copyright 2017 Broadcom
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License, version 2, as
|
|
# published by the Free Software Foundation (the "GPL").
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License version 2 (GPLv2) for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# version 2 (GPLv2) along with this source code.
|
|
#
|
|
# $Id: Makefile.linux-nsx_wrl-2_6,v 1.15 Broadcom SDK $
|
|
# $Copyright: (c) 2007 Broadcom Corp.
|
|
# All Rights Reserved.$
|
|
|
|
ifeq (,$(WRS_LINUX_VERSION))
|
|
WRS_LINUX_VERSION=2.0
|
|
endif
|
|
|
|
# Look for custom tools
|
|
ifneq (,$(MIPS_TOOLS_DIR))
|
|
ifneq (,$(MIPS_CROSS_COMPILE))
|
|
override PATH := $(MIPS_TOOLS_DIR):$(PATH)
|
|
override CROSS_COMPILE := $(MIPS_CROSS_COMPILE)
|
|
endif
|
|
endif
|
|
|
|
# Default Linux Kernel directory
|
|
ifeq (,$(KERNDIR))
|
|
|
|
ifeq (1.4,$(WRS_LINUX_VERSION))
|
|
|
|
ifeq (,$(CROSS_COMPILE))
|
|
CROSS_COMPILE := mips-wrs-linux-gnu-
|
|
endif
|
|
|
|
KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm91125cpci_32_be_glibc_std/build/linux-2.6.14-cgl
|
|
|
|
export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin
|
|
override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH)
|
|
else
|
|
|
|
ifeq (2.0,$(WRS_LINUX_VERSION))
|
|
|
|
ifeq (,$(CROSS_COMPILE))
|
|
CROSS_COMPILE := mips-wrs-linux-gnu-mips-glibc_std-
|
|
endif
|
|
|
|
KERNDIR:= /projects/ntsw-tools/linux/wrslinux_2.0/nsx/glibc_std/build/linux-2.6.21-standard
|
|
|
|
WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux
|
|
|
|
TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin
|
|
WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin
|
|
|
|
WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin
|
|
override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
|
|
|
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include
|
|
|
|
export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY
|
|
|
|
comma = ,
|
|
basetarget = $(basename $(notdir $@))
|
|
modname = $(basetarget)
|
|
|
|
# Extra variables.
|
|
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
|
|
|
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
|
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
|
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
|
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
|
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# Default Linux include directory
|
|
ifeq (,$(LINUX_INCLUDE))
|
|
LINUX_INCLUDE := $(KERNDIR)/include
|
|
endif
|
|
|
|
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
|
ENDIAN = BE_HOST=1
|
|
CFGFLAGS += -D$(ENDIAN)
|
|
CFGFLAGS += -DBCM_PLATFORM_STRING=\"NSX_BCM1125\"
|
|
|
|
ARCH = mips
|
|
KBUILD_VERBOSE = 1
|
|
|
|
export ARCH KBUILD_VERBOSE
|
|
|
|
ifeq (1.4,$(WRS_LINUX_VERSION))
|
|
# From Linux Kbuild output
|
|
|
|
ifeq (,$(KFLAGS))
|
|
KFLAGS := -D__KERNEL__ -Iinclude -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -g -G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 -march=sb1 -Wa,-32 -Wa,-march=sb1 -Wa,-mips64 -Wa,--trap -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL -mlong-calls
|
|
#-Wdeclaration-after-statement
|
|
endif
|
|
|
|
else
|
|
|
|
ifeq (2.0,$(WRS_LINUX_VERSION))
|
|
|
|
ifeq (,$(KFLAGS))
|
|
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=sb1 -Wa,--trap -Iinclude/asm-mips/mach-sibyte -Iinclude/asm-mips/mach-generic -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls
|
|
endif
|
|
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(targetplat),user)
|
|
include ${SDK}/make/Makefile.linux-kernel-2_6
|
|
endif
|
|
|
|
|
|
ifneq (,$(findstring TCL,$(FEATURE_LIST)))
|
|
LINK_STATIC=0
|
|
export LINK_STATIC
|
|
endif
|
|
|
|
|