aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp43
1 files changed, 43 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..aed5304
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,43 @@
+cc_defaults {
+ name: "awk-defaults",
+
+ srcs: [
+ // We remove the upstream ytab.c/ytab.h and let the build system build
+ // awkgram.y for us. Because all the source refers to ytab.h, we have a
+ // one-line ytab.h that includes the generated awkgram.h.
+ "awkgram.y",
+ "b.c",
+ "lex.c",
+ "lib.c",
+ "main.c",
+ "parse.c",
+ // We don't build or run `maketab` because it can't cope with modern
+ // yacc output which generates an enum rather than #defines. Luckily
+ // the upstream prebuilt proctab.c is good enough.
+ "proctab.c",
+ "run.c",
+ "tran.c",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ // Ignore a few harmless idioms widely used in this code.
+ "-Wno-missing-field-initializers",
+ "-Wno-self-assign",
+ "-Wno-unused-parameter",
+ ],
+}
+
+cc_binary {
+ name: "awk",
+ defaults: ["awk-defaults"],
+}
+
+cc_binary {
+ name: "awk_vendor",
+ defaults: ["awk-defaults"],
+ stem: "awk",
+ vendor: true,
+}