openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

Makefile (1807B)


      1 #
      2 #  Copyright 2017 Broadcom
      3 #  
      4 #  This program is free software; you can redistribute it and/or modify
      5 #  it under the terms of the GNU General Public License, version 2, as
      6 #  published by the Free Software Foundation (the "GPL").
      7 #  
      8 #  This program is distributed in the hope that it will be useful, but
      9 #  WITHOUT ANY WARRANTY; without even the implied warranty of
     10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     11 #  General Public License version 2 (GPLv2) for more details.
     12 #  
     13 #  You should have received a copy of the GNU General Public License
     14 #  version 2 (GPLv2) along with this source code.
     15 #
     16 # -*- Makefile -*-
     17 # $Id: Makefile,v 1.7 Broadcom SDK $
     18 # $Copyright: (c) 2005 Broadcom Corp.
     19 # All Rights Reserved.$
     20 
     21 #
     22 # This make job requires the following environment variables to be set:
     23 #
     24 # SDK                - path to StrataXGS SDK root directory
     25 #
     26 # Optionally the following environment variables can be set to
     27 # override the default build server configuration:
     28 #
     29 # MIPS_TOOLS_DIR     - path to build tools (if not in PATH already)
     30 # MIPS_CROSS_COMPILE - cross compile tools prefix
     31 # LINUX_INCLUDE      - path to Linux kernel include directory
     32 #
     33 
     34 SDK :=$(shell if [ -n "$$SDK" ] ; then\
     35 	echo $$SDK;\
     36 	else\
     37 	cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
     38 	dir=`cd ../;pwd`;			\
     39 	if [ "$$dir" = "/" ] ; then		\
     40 	   echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2;		\
     41 	   exit 1;				\
     42 	fi ;					\
     43 	cd $$dir;				\
     44 	done ;					\
     45 	pwd;					\
     46 	fi)
     47 
     48 ifeq ($(SDK),)
     49 $(error Please run this in a tree)
     50 endif
     51 
     52 export SDK
     53 
     54 override kernel_version=3_14
     55 platform=iproc-$(kernel_version)
     56 
     57 IPROC_BUILD=1
     58 export IPROC_BUILD
     59 export BUILD_PLATFORM
     60 export ARM_LINUX_VERSION
     61 
     62 LINUX_MAKE_USER=1
     63 export ADD_TO_CFLAGS
     64 
     65 include ${SDK}/make/Make.linux