diff options
author | Niranjan Pendharkar <npendhar@codeaurora.org> | 2013-02-08 14:09:13 -0800 |
---|---|---|
committer | Niranjan Pendharkar <npendhar@codeaurora.org> | 2013-02-08 14:34:44 -0800 |
commit | 8a5f846f83556370f8c69b8573ebd7ceb01653f7 (patch) | |
tree | 33a50a21940ba01cefbf41af94fcf7a9e04972a3 /brctl | |
parent | 1736fa987eb6b66b6eaedbc1cd3df4f48b873721 (diff) | |
download | android_external_brctl-8a5f846f83556370f8c69b8573ebd7ceb01653f7.tar.gz android_external_brctl-8a5f846f83556370f8c69b8573ebd7ceb01653f7.tar.bz2 android_external_brctl-8a5f846f83556370f8c69b8573ebd7ceb01653f7.zip |
brctl: Add Android makefiles to build on Android
This patch adds makefiles to build this open source tool
on Android. This patch also addresses some compatibilty
issues between GNU C and bionic C implementation.
Change-Id: Ic35ab4f98d5f252d53e92c6cde43f0673cef9d4a
Diffstat (limited to 'brctl')
-rw-r--r-- | brctl/Android.mk | 25 | ||||
-rw-r--r-- | brctl/brctl.c | 7 |
2 files changed, 28 insertions, 4 deletions
diff --git a/brctl/Android.mk b/brctl/Android.mk new file mode 100644 index 0000000..04897a2 --- /dev/null +++ b/brctl/Android.mk @@ -0,0 +1,25 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=\ + brctl_cmd.c \ + brctl_disp.c \ + brctl.c + +LOCAL_CFLAGS := -O2 -g -Wno-ignored-qualifiers +LOCAL_CFLAGS += -Wno-sign-compare -Wno-missing-field-initializers +LOCAL_CFLAGS += -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" +LOCAL_CFLAGS += -DFEATURE_ANDROID + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/../libbridge/ + +LOCAL_SYSTEM_SHARED_LIBRARIES := libc libcutils + +LOCAL_MODULE_TAGS := debug + +LOCAL_STATIC_LIBRARIES += libbridge + +LOCAL_MODULE := brctl + +include $(BUILD_EXECUTABLE) diff --git a/brctl/brctl.c b/brctl/brctl.c index 46ca352..87af143 100644 --- a/brctl/brctl.c +++ b/brctl/brctl.c @@ -24,7 +24,6 @@ #include "libbridge.h" #include "config.h" - #include "brctl.h" static void help() @@ -39,9 +38,9 @@ int main(int argc, char *const* argv) const struct command *cmd; int f; static const struct option options[] = { - { .name = "help", .val = 'h' }, - { .name = "version", .val = 'V' }, - { 0 } + { .name = "help", .has_arg = '0', .flag = 0, .val = 'h' }, + { .name = "version", .has_arg = '0', .flag = 0, .val = 'V' }, + { 0,0,0,0 } }; while ((f = getopt_long(argc, argv, "Vh", options, NULL)) != EOF) |