| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/components.gni") |
| |
| # The following binaries are disabled: |
| # "chgrp", |
| # "chmod", |
| # "chown", |
| # "chroot", |
| # "cron", |
| # "flock", |
| # "getconf", |
| # "kill", |
| # "ln", |
| # "logger", |
| # "logname", |
| # "mkfifo", |
| # "nice", |
| # "nohup", |
| # "renice", |
| # "setsid", |
| # "time", |
| # "uname", |
| # "whoami", |
| |
| binaries = [ |
| "basename", |
| "cal", |
| "cat", |
| "cksum", |
| "cmp", |
| "cols", |
| "comm", |
| "cp", |
| "cut", |
| "date", |
| "dirname", |
| "du", |
| "echo", |
| "ed", |
| "env", |
| "expand", |
| "expr", |
| "false", |
| "find", |
| "fold", |
| "grep", |
| "head", |
| "hostname", |
| "join", |
| "link", |
| "ls", |
| "md5sum", |
| "mkdir", |
| "mktemp", |
| "mv", |
| "nl", |
| "od", |
| "paste", |
| "pathchk", |
| "printenv", |
| "printf", |
| "pwd", |
| "readlink", |
| "rev", |
| "rm", |
| "rmdir", |
| "sed", |
| "seq", |
| "sha1sum", |
| "sha224sum", |
| "sha256sum", |
| "sha384sum", |
| "sha512-224sum", |
| "sha512-256sum", |
| "sha512sum", |
| "sleep", |
| "sort", |
| "split", |
| "sponge", |
| "strings", |
| "sync", |
| "tail", |
| "tar", |
| "tee", |
| "test", |
| "tftp", |
| "touch", |
| "tr", |
| "true", |
| "tsort", |
| "tty", |
| "unexpand", |
| "uniq", |
| "unlink", |
| "uudecode", |
| "uuencode", |
| "wc", |
| "which", |
| "xargs", |
| "xinstall", |
| "yes", |
| ] |
| |
| group("bins") { |
| deps = [] |
| |
| foreach(bin, binaries) { |
| deps += [ ":${bin}_bin" ] |
| } |
| } |
| |
| config("sbase_config") { |
| cflags = [ |
| "-Wno-implicit-fallthrough", |
| "-Wno-missing-field-initializers", |
| "-Wno-sign-compare", |
| "-Wno-sometimes-uninitialized", |
| "-Wno-strict-prototypes", |
| "-Wno-tautological-constant-out-of-range-compare", |
| "-Wno-write-strings", |
| ] |
| } |
| |
| foreach(bin, binaries) { |
| executable("${bin}_bin") { |
| output_name = bin |
| |
| sources = [ "$bin.c" ] |
| |
| deps = [ |
| "libutf", |
| "libutil", |
| "//sdk/lib/fdio", |
| "//src/zircon/lib/zircon", |
| ] |
| |
| configs += [ ":sbase_config" ] |
| } |
| |
| fuchsia_package("${bin}_pkg") { |
| package_name = bin |
| deps = [ ":${bin}_bin" ] |
| } |
| |
| fuchsia_shell_package(bin) { |
| deps = [ ":${bin}_bin" ] |
| } |
| } |
| |
| group("sbase-pkgs") { |
| deps = [] |
| foreach(bin, binaries) { |
| deps += [ ":${bin}_pkg" ] |
| } |
| } |
| |
| group("sbase") { |
| deps = [] |
| foreach(bin, binaries) { |
| deps += [ ":$bin" ] |
| } |
| } |