170c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# Copyright (C) 2015 The Android Open Source Project
270c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET#
370c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# Licensed under the Apache License, Version 2.0 (the "License");
470c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# you may not use this file except in compliance with the License.
570c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# You may obtain a copy of the License at
670c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET#
770c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET#      http://www.apache.org/licenses/LICENSE-2.0
870c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET#
970c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# Unless required by applicable law or agreed to in writing, software
1070c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# distributed under the License is distributed on an "AS IS" BASIS,
1170c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1270c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# See the License for the specific language governing permissions and
1370c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# limitations under the License.
1470c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET
1570c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_PATH := $(call my-dir)
1670c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET
1770c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETrootdev_CPPFLAGS := -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
1870c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET  -D_LARGEFILE64_SOURCE
1970c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET
2070c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETrootdev_CFLAGS := -Wall -Werror -Wno-sign-compare
2170c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET
2270c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# Build the shared library.
2370c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETinclude $(CLEAR_VARS)
2470c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_MODULE := librootdev
2570c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_CFLAGS += $(rootdev_CFLAGS)
269d44d9dd53bd3da3b01445a52b5d2420dc40f9b2Bertrand SIMONNETLOCAL_CLANG := true
2770c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_CPPFLAGS += $(rootdev_CPPFLAGS)
2870c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_SRC_FILES := rootdev.c
2970c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
3070c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETinclude $(BUILD_SHARED_LIBRARY)
3170c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET
3270c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNET# Build the command line tool.
3370c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETinclude $(CLEAR_VARS)
3470c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_MODULE := rootdev
3570c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_CFLAGS += $(rootdev_CFLAGS)
369d44d9dd53bd3da3b01445a52b5d2420dc40f9b2Bertrand SIMONNETLOCAL_CLANG := true
3770c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_CPPFLAGS += $(rootdev_CPPFLAGS)
3870c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_SHARED_LIBRARIES := librootdev
3970c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETLOCAL_SRC_FILES := main.c
4070c3349d3c1dad47ded90d8da38811c1a8c3fef3Bertrand SIMONNETinclude $(BUILD_EXECUTABLE)
41