1*9bcc1fc0SBob Badour// Copyright (C) 2015 The Android Open Source Project 2*9bcc1fc0SBob Badour// 3*9bcc1fc0SBob Badour// Licensed under the Apache License, Version 2.0 (the "License"); 4*9bcc1fc0SBob Badour// you may not use this file except in compliance with the License. 5*9bcc1fc0SBob Badour// You may obtain a copy of the License at 6*9bcc1fc0SBob Badour// 7*9bcc1fc0SBob Badour// http://www.apache.org/licenses/LICENSE-2.0 8*9bcc1fc0SBob Badour// 9*9bcc1fc0SBob Badour// Unless required by applicable law or agreed to in writing, software 10*9bcc1fc0SBob Badour// distributed under the License is distributed on an "AS IS" BASIS, 11*9bcc1fc0SBob Badour// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*9bcc1fc0SBob Badour// See the License for the specific language governing permissions and 13*9bcc1fc0SBob Badour// limitations under the License. 14*9bcc1fc0SBob Badour 15*9bcc1fc0SBob Badourpackage { 16*9bcc1fc0SBob Badour default_applicable_licenses: ["external_rootdev_license"], 17*9bcc1fc0SBob Badour} 18*9bcc1fc0SBob Badour 19*9bcc1fc0SBob Badour// Added automatically by a large-scale-change 20*9bcc1fc0SBob Badour// See: http://go/android-license-faq 21*9bcc1fc0SBob Badourlicense { 22*9bcc1fc0SBob Badour name: "external_rootdev_license", 23*9bcc1fc0SBob Badour visibility: [":__subpackages__"], 24*9bcc1fc0SBob Badour license_kinds: [ 25*9bcc1fc0SBob Badour "SPDX-license-identifier-BSD", 26*9bcc1fc0SBob Badour ], 27*9bcc1fc0SBob Badour license_text: [ 28*9bcc1fc0SBob Badour "NOTICE", 29*9bcc1fc0SBob Badour ], 30*9bcc1fc0SBob Badour} 31*9bcc1fc0SBob Badour 32*9bcc1fc0SBob Badourrootdev_CFLAGS = [ 33*9bcc1fc0SBob Badour "-D_BSD_SOURCE", 34*9bcc1fc0SBob Badour "-D_FILE_OFFSET_BITS=64", 35*9bcc1fc0SBob Badour "-D_LARGEFILE_SOURCE", 36*9bcc1fc0SBob Badour "-include sys/sysmacros.h", 37*9bcc1fc0SBob Badour "-Wall", 38*9bcc1fc0SBob Badour "-Werror", 39*9bcc1fc0SBob Badour "-Wno-deprecated-declarations", 40*9bcc1fc0SBob Badour "-Wno-sign-compare", 41*9bcc1fc0SBob Badour] 42*9bcc1fc0SBob Badour 43*9bcc1fc0SBob Badour// Build the shared library. 44*9bcc1fc0SBob Badourcc_library_shared { 45*9bcc1fc0SBob Badour name: "librootdev", 46*9bcc1fc0SBob Badour cflags: rootdev_CFLAGS, 47*9bcc1fc0SBob Badour srcs: ["rootdev.c"], 48*9bcc1fc0SBob Badour export_include_dirs: ["."], 49*9bcc1fc0SBob Badour} 50*9bcc1fc0SBob Badour 51*9bcc1fc0SBob Badour// Build the command line tool. 52*9bcc1fc0SBob Badourcc_binary { 53*9bcc1fc0SBob Badour name: "rootdev", 54*9bcc1fc0SBob Badour cflags: rootdev_CFLAGS, 55*9bcc1fc0SBob Badour shared_libs: ["librootdev"], 56*9bcc1fc0SBob Badour srcs: ["main.c"], 57*9bcc1fc0SBob Badour} 58