Makefile.linux-nsx_wrl-2_6 (3627B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 6 ifeq (,$(WRS_LINUX_VERSION)) 7 WRS_LINUX_VERSION=2.0 8 endif 9 10 # Look for custom tools 11 ifneq (,$(MIPS_TOOLS_DIR)) 12 ifneq (,$(MIPS_CROSS_COMPILE)) 13 override PATH := $(MIPS_TOOLS_DIR):$(PATH) 14 override CROSS_COMPILE := $(MIPS_CROSS_COMPILE) 15 endif 16 endif 17 18 # Default Linux Kernel directory 19 ifeq (,$(KERNDIR)) 20 21 ifeq (1.4,$(WRS_LINUX_VERSION)) 22 23 ifeq (,$(CROSS_COMPILE)) 24 CROSS_COMPILE := mips-wrs-linux-gnu- 25 endif 26 27 KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm91125cpci_32_be_glibc_std/build/linux-2.6.14-cgl 28 29 export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin 30 override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH) 31 else 32 33 ifeq (2.0,$(WRS_LINUX_VERSION)) 34 35 ifeq (,$(CROSS_COMPILE)) 36 CROSS_COMPILE := mips-wrs-linux-gnu-mips-glibc_std- 37 endif 38 39 KERNDIR:= /projects/ntsw-tools/linux/wrslinux_2.0/nsx/glibc_std/build/linux-2.6.21-standard 40 41 WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux 42 43 TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin 44 WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin 45 46 WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin 47 override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH) 48 49 WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include 50 51 export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY 52 53 comma = , 54 basetarget = $(basename $(notdir $@)) 55 modname = $(basetarget) 56 57 # Extra variables. 58 EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) 59 60 name-fix = $(subst $(comma),_,$(subst -,_,$1)) 61 basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" 62 modname_flags = $(if $(filter 1,$(words $(modname))),\ 63 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") 64 65 endif 66 endif 67 endif 68 69 # Default Linux include directory 70 ifeq (,$(LINUX_INCLUDE)) 71 LINUX_INCLUDE := $(KERNDIR)/include 72 endif 73 74 CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1 75 ENDIAN = BE_HOST=1 76 CFGFLAGS += -D$(ENDIAN) 77 CFGFLAGS += -DBCM_PLATFORM_STRING=\"NSX_BCM1125\" 78 79 ARCH = mips 80 KBUILD_VERBOSE = 1 81 82 export ARCH KBUILD_VERBOSE 83 84 ifeq (1.4,$(WRS_LINUX_VERSION)) 85 # From Linux Kbuild output 86 87 ifeq (,$(KFLAGS)) 88 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 89 #-Wdeclaration-after-statement 90 endif 91 92 else 93 94 ifeq (2.0,$(WRS_LINUX_VERSION)) 95 96 ifeq (,$(KFLAGS)) 97 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 98 endif 99 100 endif 101 endif 102 103 ifneq ($(targetplat),user) 104 include ${SDK}/make/Makefile.linux-kernel-2_6 105 endif 106 107 108 ifneq (,$(findstring TCL,$(FEATURE_LIST))) 109 LINK_STATIC=0 110 export LINK_STATIC 111 endif 112 113