agones.dev/agones@v1.54.0/sdks/cpp/Makefile (about) 1 # Copyright 2019 Google LLC All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 # 16 # Makefile for testing and building the C++ SDK 17 # 18 19 mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) 20 source_path := $(dir $(mkfile_path)) 21 build_path := $(source_path)/.build 22 package_path := $(build_path)/.install 23 install_path := /opt/local 24 archive_path := $(source_path)/.archives 25 26 build: 27 -mkdir $(build_path) 28 -mkdir $(archive_path) 29 cd $(build_path) && cmake .. -DCMAKE_BUILD_TYPE=Release -DAGONES_SILENT_OUTPUT=ON -G "Unix Makefiles" -Wno-dev -DCMAKE_INSTALL_PREFIX=.install 30 cd $(build_path) && cmake --build . --target install -j$$(nproc) -- -s 31 32 verify: 33 cd $(build_path)/clang-format && cmake . -DAGONES_SILENT_OUTPUT=ON 34 35 install: 36 cp -r $(build_path)/.install $(install_path) 37 38 archive: VERSION = "dev" 39 archive: 40 cd $(package_path) && tar cf $(archive_path)/agonessdk-$(VERSION)-linux-arch_64.tar.gz * 41 42 clean: 43 -rm -rf $(build_path)