Make.tools (3643B)
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 # Customize the location of your local tools below. 7 # Several standard flavors are auto-selected based on uname -s 8 # output. If the SYSNAME environment variable is set, that overrides 9 # calling uname. There are also a couple of Windows flavors that are 10 # selected by setting the HOSTTYPE environment variable. These should 11 # convert to using SYSNAME when I can test them... 12 # HOSTTYPE is still set because it is used in various Makefiles in the tree 13 14 SYSOK = 0 15 ifneq "$(SYSNAME)" "" 16 SYSOK = 1 # already set from environment 17 endif 18 19 # non-unix types first 20 ifeq "$(SYSOK)" "0" 21 ifeq "$(HOSTTYPE)" "Windows2000PC" 22 SYSOK = 1 23 #MAKE = make 24 HCC ?= cl 25 SED = SED_NOT_DEFINED 26 COMPRESS = COMPRESS_NOT_DEFINED 27 GZIP = GZIP_NOT_DEFINED 28 LZMA = LZMA_NOT_DEFINED 29 TOUCH = TOUCH_NOT_DEFINED 30 31 export PERL_BASE ?= c:/Perl/ 32 ifneq "$(PERL_BASE)" "" 33 PERL = $(PERL_BASE)/bin/perl 34 else 35 PERL = perl 36 endif 37 endif 38 endif 39 40 # unix or unix-type type hosts 41 ifeq "$(SYSOK)" "0" 42 SYSNAME := $(shell uname -s) 43 ifeq "$(SYSNAME)" "Linux" 44 SYSOK = 1 45 HCC ?= /usr/bin/gcc 46 SED = /bin/sed 47 COMPRESS = /usr/bin/compress 48 GZIP = /usr/bin/gzip 49 LZMA = /projects/ntsw-tools/tools/bin/7za 50 TEST = /usr/bin/test 51 PERL = $(shell which perl) 52 LN = /bin/ln 53 TOUCH = /bin/touch 54 HOSTTYPE= i386-linux 55 endif 56 ifeq "$(SYSNAME)" "SunOS" 57 SYSOK = 1 58 HCC ?= /tools/bin/gcc 59 SED = /usr/ucb/sed 60 COMPRESS = /bin/compress 61 GZIP = /usr/bin/gzip 62 LZMA = LZMA_NOT_DEFINED 63 TEST = /bin/test 64 PERL = $(shell which perl) 65 LN = /usr/bin/ln 66 TOUCH = /bin/touch 67 HOSTTYPE= sun4 68 endif 69 ifeq "$(SYSNAME)" "NetBSD" 70 SYSOK = 1 71 HCC ?= /usr/bin/gcc 72 SED = /usr/bin/sed 73 COMPRESS = /usr/bin/compress 74 GZIP = /usr/bin/gzip 75 LZMA = LZMA_NOT_DEFINED 76 PERL = /usr/pkg/bin/perl 77 LN = /bin/ln 78 TOUCH = /bin/touch 79 HOSTTYPE= i386-linux 80 endif 81 ifneq "$(findstring CYGWIN,$(SYSNAME))" "" 82 SYSOK = 1 83 HCC ?= /usr/bin/gcc 84 SED = /usr/bin/sed 85 COMPRESS = COMPRESS_NOT_DEFINED 86 GZIP = GZIP_NOT_DEFINED 87 LZMA = LZMA_NOT_DEFINED 88 PERL = /usr/bin/perl 89 LN = /bin/ln 90 TOUCH = /bin/touch 91 HOSTTYPE= Windows_Cygnus 92 export HOSTTYPE # systems makefiles need this 93 endif 94 ifeq "$(SYSNAME)" "Darwin" 95 SYSOK = 1 96 HCC ?= /usr/bin/gcc 97 SED = /usr/bin/sed 98 COMPRESS = /usr/bin/compress 99 GZIP = /usr/bin/gzip 100 LZMA = LZMA_NOT_DEFINED 101 TEST = /bin/test 102 PERL = $(shell which perl) 103 LN = /bin/ln 104 TOUCH = /usr/bin/touch 105 HOSTTYPE= i386-linux 106 endif 107 endif 108 109 110 # 111 # Platform Independent 112 # 113 ifeq "$(HOSTTYPE)" "Windows2000PC" 114 MKTOOL = $(PERL) ${SDK}/tools/mktool.pl 115 BCM2C = $(PERL) ${SDK}/tools/bcm2c.pl 116 MKVERS = $(PERL) ${SDK}/tools/version.pl 117 RM = rm -f 118 CP = cp 119 #MKDIR = mkdir -p 120 MKDIR = c:/windriver/workbench-3.0/x86-win32/bin/mkdir -p 121 FOREACH = $(MKTOOL) -foreach 122 MAKEDEP = echo 123 ECHO = echo 124 #TOUCH = touch 125 TOUCH = c:/windriver/workbench-3.0/x86-win32/bin/touch 126 MKBEEP = $(MKTOOL) -beep 127 else 128 MKTOOL = $(PERL) ${SDK}/tools/mktool.pl 129 BCM2C = $(PERL) ${SDK}/tools/bcm2c.pl 130 MKVERS = $(PERL) ${SDK}/tools/version.pl 131 RM = /bin/rm -rf 132 CP = /bin/cp 133 MKDIR = /bin/mkdir -p 134 FOREACH = $(MKTOOL) -foreach 135 MAKEDEP = /bin/echo 136 ECHO = /bin/echo 137 MKBEEP = $(MKTOOL) -beep 138 endif 139 140 # 141 # You may override any of the previous decisions and assignments 142 # determined above by providing your own makefile to be 143 # included here. Just set MAKE_TOOLS_LOCAL to the path to your makefile. 144 # 145 # Don't forget to set SYSOK=1 in your local makefile if you are 146 # providing a brand new 147 # environment. 148 # 149 150 ifdef MAKE_TOOLS_LOCAL 151 include ${MAKE_TOOLS_LOCAL} 152 endif 153 154 155 ifeq "$(SYSOK)" "0" 156 $(error Cannot figure out system type) 157 endif