# Copyright (c) 2015 - present Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. @SET_MAKE@ ROOT_DIR = . include $(ROOT_DIR)/Makefile.config all: ifeq (@BUILD_JAVA_ANALYZERS@,yes) all: java endif ifeq (@BUILD_C_ANALYZERS@,yes) all: clang endif ifneq (@BUILD_JAVA_ANALYZERS@,yes) java: @echo @echo " error: java analyzers disabled by ./configure" @echo " to enable them again, see" @echo @echo " ./configure --help" @echo @exit 1 else java: $(MAKE) -C $(INFER_DIR) java endif clang_setup: export CC="@CC@" CFLAGS="@CFLAGS@"; \ export CXX="@CXX@" CXXFLAGS="@CXXFLAGS@"; \ export CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@"; \ $(FCP_DIR)/clang/setup.sh clang_plugin: clang_setup $(MAKE) -C $(FCP_DIR)/libtooling all \ CC=@CC@ CXX=@CXX@ \ CXX="@CXX@" CXXFLAGS="@CXXFLAGS@" \ CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" \ LOCAL_CLANG=@CLANG_PREFIX@/bin/clang \ CLANG_PREFIX=@CLANG_PREFIX@ \ CLANG_INCLUDES=@CLANG_INCLUDES@ $(MAKE) -C $(FCP_DIR)/clang-ocaml all \ build/clang_ast_proj.ml build/clang_ast_proj.mli \ CC=@CC@ CXX=@CXX@ \ CXX="@CXX@" CXXFLAGS="@CXXFLAGS@" \ CPP="@CPP@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" \ LOCAL_CLANG=@CLANG_PREFIX@/bin/clang \ CLANG_PREFIX=@CLANG_PREFIX@ \ CLANG_INCLUDES=@CLANG_INCLUDES@ ifneq (@BUILD_C_ANALYZERS@,yes) clang: @echo @echo " error: clang analyzers disabled by ./configure" @echo " to enable them again, see" @echo @echo " ./configure --help" @echo @exit 1 else clang: clang_plugin $(MAKE) -C $(INFER_DIR) clang endif clean: $(MAKE) -C $(FCP_DIR) clean $(MAKE) -C $(FCP_DIR)/clang-ocaml clean $(MAKE) -C $(INFER_DIR) clean .PHONY: all clean clang clang_plugin clang_setup java