Files
my-rook-config/build/makelib/cross.mk
T
Bassam Tabbara e8d1470310 build: build more packages from source
we now build all the required packages for rookd from source. also
reorganized the external project a bit to support this.

Removed STATIC makefile option and replaced with LINKMODE
2016-12-12 17:21:52 -05:00

48 lines
1.3 KiB
Makefile

# Copyright 2016 The Rook Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ====================================================================================
# Makefile helper functions for cross compiling
#
ifeq ($(GOOS)_$(GOARCH),linux_amd64)
CROSS_TRIPLE=x86_64-linux-gnu
CC=x86_64-linux-gnu-gcc
CXX=x86_64-linux-gnu-g++
STRIP=x86_64-linux-gnu-strip
endif
ifeq ($(GOOS)_$(GOARCH),linux_arm64)
CROSS_TRIPLE=aarch64-linux-gnu
CC=aarch64-linux-gnu-gcc
CXX=aarch64-linux-gnu-g++
STRIP=aarch64-linux-gnu-strip
endif
ifeq ($(GOOS)_$(GOARCH),darwin_amd64)
CROSS_TRIPLE=x86_64-apple-darwin15
CC=o64-clang
CXX=o64-clang++
STRIP=x86_64-apple-darwin15-strip
endif
ifeq ($(CEPHD_PLATFORM),windows_amd64)
CROSS_TRIPLE=x86_64-w64-mingw32
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
STRIP=x86_64-w64-mingw32-strip
endif
export CC CXX STRIP