11cb0ef41Sopenharmony_ci# Copyright 2011 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci# Redistribution and use in source and binary forms, with or without
31cb0ef41Sopenharmony_ci# modification, are permitted provided that the following conditions are
41cb0ef41Sopenharmony_ci# met:
51cb0ef41Sopenharmony_ci#
61cb0ef41Sopenharmony_ci#     * Redistributions of source code must retain the above copyright
71cb0ef41Sopenharmony_ci#       notice, this list of conditions and the following disclaimer.
81cb0ef41Sopenharmony_ci#     * Redistributions in binary form must reproduce the above
91cb0ef41Sopenharmony_ci#       copyright notice, this list of conditions and the following
101cb0ef41Sopenharmony_ci#       disclaimer in the documentation and/or other materials provided
111cb0ef41Sopenharmony_ci#       with the distribution.
121cb0ef41Sopenharmony_ci#     * Neither the name of Google Inc. nor the names of its
131cb0ef41Sopenharmony_ci#       contributors may be used to endorse or promote products derived
141cb0ef41Sopenharmony_ci#       from this software without specific prior written permission.
151cb0ef41Sopenharmony_ci#
161cb0ef41Sopenharmony_ci# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171cb0ef41Sopenharmony_ci# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181cb0ef41Sopenharmony_ci# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191cb0ef41Sopenharmony_ci# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201cb0ef41Sopenharmony_ci# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211cb0ef41Sopenharmony_ci# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221cb0ef41Sopenharmony_ci# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231cb0ef41Sopenharmony_ci# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241cb0ef41Sopenharmony_ci# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251cb0ef41Sopenharmony_ci# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261cb0ef41Sopenharmony_ci# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci# This is Makefile for clang plugin part of gcmole tool. See README.
291cb0ef41Sopenharmony_ci
301cb0ef41Sopenharmony_ciLLVM_SRC_INCLUDE:=$(LLVM_SRC_ROOT)/include
311cb0ef41Sopenharmony_ciLLVM_BUILD_INCLUDE:=$(BUILD_ROOT)/include
321cb0ef41Sopenharmony_ciCLANG_SRC_INCLUDE:=$(CLANG_SRC_ROOT)/include
331cb0ef41Sopenharmony_ciCLANG_BUILD_INCLUDE:=$(BUILD_ROOT)/tools/clang/include
341cb0ef41Sopenharmony_ci
351cb0ef41Sopenharmony_ciCXXFLAGS = -O3 -g3
361cb0ef41Sopenharmony_ciall: libgcmole.so
371cb0ef41Sopenharmony_ciRelease: libgcmole.so
381cb0ef41Sopenharmony_ci
391cb0ef41Sopenharmony_ciDebug: CXXFLAGS = -O1 -DDEBUG -g
401cb0ef41Sopenharmony_ciDebug: libgcmole.so
411cb0ef41Sopenharmony_ci
421cb0ef41Sopenharmony_cilibgcmole.so: gcmole.cc
431cb0ef41Sopenharmony_ci	$(CXX) -I$(LLVM_BUILD_INCLUDE) -I$(LLVM_SRC_INCLUDE)                  \
441cb0ef41Sopenharmony_ci	-I$(CLANG_BUILD_INCLUDE) -I$(CLANG_SRC_INCLUDE) -I. ${CXXFLAGS}          \
451cb0ef41Sopenharmony_ci	-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS         \
461cb0ef41Sopenharmony_ci	-D__STDC_LIMIT_MACROS -fomit-frame-pointer -fno-exceptions        \
471cb0ef41Sopenharmony_ci	-fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing \
481cb0ef41Sopenharmony_ci	-pedantic -Wno-long-long -Wall -W -Wno-unused-parameter               \
491cb0ef41Sopenharmony_ci	-Wwrite-strings -static-libstdc++ -std=c++0x -shared -o libgcmole.so  \
501cb0ef41Sopenharmony_ci	gcmole.cc
511cb0ef41Sopenharmony_ci
521cb0ef41Sopenharmony_ciclean:
531cb0ef41Sopenharmony_ci	$(RM) libgcmole.so
54