Home | History | Annotate | Download | only in so
      1 #!/usr/bin/env bash
      2 # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #     http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 # ==============================================================================
     16 # This sub Makefile compiles libraries under this directory. This is designed to
     17 # be used as a sub Makefile with tensorflow/contrib/makefile/Makefile.
     18 # You can build targets in this file by including this sub makefile like:
     19 # $ make -f tensorflow/contrib/makefile/Makefile TARGET=<target> \
     20 # SUB_MAKEFILES=\
     21 # $(pwd)/tensorflow/contrib/makefile/sub_makefiles/so/Makefile.in \
     22 # (optional: NDK_ROOT=<ndk_root>) tensorflow-core.so
     23 
     24 SO_NAME := tensorflow-core.so
     25 SO_PATH := $(LIBDIR)$(SO_NAME)
     26 
     27 $(SO_PATH): $(LIB_OBJS)
     28 	@mkdir -p $(dir $@)
     29 	$(CXX) $(CXXFLAGS) $(INCLUDES) \
     30 	-o $@ $(LIB_OBJS) \
     31 	$(LIBFLAGS) $(LDFLAGS) -shared $(LIBS)
     32 
     33 $(SO_NAME): $(SO_PATH)
     34