1# Copyright 2020 Google LLC
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# This is a minimal Makefile to show how to use the Cloud Bigtable C++ client
16# for developers that use make(1) as their build system.
17
18# The CXX, CXXFLAGS and CXXLD variables are hard-coded. These values work for
19# our tests, but applications would typically make them configurable parameters.
20CXX=g++
21CXXFLAGS=-std=c++11
22CXXLD=$(CXX)
23
24all: quickstart
25
26# Configuration variables to compile and link against the Google Cloud Storage
27# C++ client library.
28GCS_DEPS := storage_client
29GCS_CXXFLAGS   := $(shell pkg-config $(GCS_DEPS) --cflags)
30GCS_CXXLDFLAGS := $(shell pkg-config $(GCS_DEPS) --libs-only-L)
31GCS_LIBS       := $(shell pkg-config $(GCS_DEPS) --libs-only-l)
32
33# A target using the Google Cloud Storage C++ client library.
34quickstart: quickstart.cc
35	$(CXXLD) $(CXXFLAGS) $(GCS_CXXFLAGS) $(GCS_CXXLDFLAGS) -o $@ $^ $(GCS_LIBS)
36