diff options
author | Elliott Hughes <enh@google.com> | 2019-11-19 14:55:15 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-12-02 14:06:11 -0800 |
commit | 338a31204c8ef9442d220392ef974b46b0c06c53 (patch) | |
tree | 9048d6fab4825b5cd65257b2590c68900662018f | |
parent | bc7b434bde2d0417c37d3697fd145005d568af47 (diff) | |
download | platform_external_bc-338a31204c8ef9442d220392ef974b46b0c06c53.tar.gz platform_external_bc-338a31204c8ef9442d220392ef974b46b0c06c53.tar.bz2 platform_external_bc-338a31204c8ef9442d220392ef974b46b0c06c53.zip |
Build bc.
Test: builds
Change-Id: Ida4512cee6920d8b281e3100317f7c7b5d2101f1
-rw-r--r-- | Android.bp | 63 | ||||
l--------- | LICENSE | 1 | ||||
-rw-r--r-- | METADATA | 13 | ||||
l--------- | NOTICE | 1 | ||||
-rw-r--r-- | OWNERS | 1 |
5 files changed, 79 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 00000000..36516e4a --- /dev/null +++ b/Android.bp @@ -0,0 +1,63 @@ +cc_defaults { + name: "bc-defaults", + + cflags: [ + "-include bc-version.h", + "-DBC_ENABLED=1", + "-DDC_ENABLED=0", + "-DBC_ENABLE_EXTRA_MATH=0", + "-DBC_ENABLE_HISTORY=0", + "-DBC_ENABLE_NLS=0", + "-DBC_ENABLE_SIGNALS=1", + "-Os", + ], + generated_headers: ["bc-version.h"], + local_include_dirs: ["include"], + srcs: [ + "src/bc/*.c", + "src/*.c", + ":bc-bc_help.c", + ":bc-lib.c", + ], + stl: "none", +} + +genrule { + name: "bc-lib.c", + srcs: ["gen/lib.bc"], + out: ["gen/lib.c"], + tool_files: ["gen/strgen.sh"], + cmd: "$(location gen/strgen.sh) $(in) $(out) bc_lib bc.h bc_lib_name BC_ENABLED", +} + +genrule { + name: "bc-bc_help.c", + srcs: ["gen/bc_help.txt"], + out: ["gen/bc_help.c"], + tool_files: ["gen/strgen.sh"], + cmd: "$(location gen/strgen.sh) $(in) $(out) bc_help bc.h '' BC_ENABLED", +} + +genrule { + name: "bc-version.h", + srcs: ["Makefile.in"], + out: ["bc-version.h"], + cmd: "sed -n 's/VERSION = /#define VERSION /p' $(in) > $(out)", +} + +cc_binary { + name: "bc", + defaults: ["bc-defaults"], +} + +cc_binary { + name: "bc_vendor", + defaults: ["bc-defaults"], + stem: "bc", + vendor: true, +} + +cc_binary_host { + name: "gavinhoward-bc", + defaults: ["bc-defaults"], +} diff --git a/LICENSE b/LICENSE new file mode 120000 index 00000000..f0c42986 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +LICENSE.md
\ No newline at end of file diff --git a/METADATA b/METADATA new file mode 100644 index 00000000..fa938a2f --- /dev/null +++ b/METADATA @@ -0,0 +1,13 @@ +name: "gavinhoward/bc" +description: + "An implementation of the POSIX bc calculator with GNU extensions and dc." + +third_party { + url { + type: GIT + value: "https://github.com/gavinhoward/bc" + } + version: "2.3.0" + last_upgrade_date { year: 2019 month: 11 day: 14 } + license_type: NOTICE +} @@ -0,0 +1 @@ +LICENSE
\ No newline at end of file @@ -0,0 +1 @@ +include platform/system/core:/janitors/OWNERS |