| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | # Copyright 2007 The Android Open Source Project |
| 2 | # |
| 3 | # Copies files into the directory structure described by a manifest |
| 4 | |
| Joe Onorato | 54fba42 | 2010-06-10 18:34:55 -0700 | [diff] [blame] | 5 | # This tool is prebuilt if we're doing an app-only build. |
| Ying Wang | c7cf53e | 2014-03-07 15:55:14 -0800 | [diff] [blame] | 6 | ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),) |
| Joe Onorato | 54fba42 | 2010-06-10 18:34:55 -0700 | [diff] [blame] | 7 | |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 8 | LOCAL_PATH:= $(call my-dir) |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 9 | |
| 10 | # Logic shared between aidl and its unittests |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 11 | include $(CLEAR_VARS) |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 12 | LOCAL_MODULE := libaidl-common |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 13 | |
| Christopher Wiley | e0146cf | 2015-08-24 15:06:58 -0700 | [diff] [blame] | 14 | LOCAL_CLANG_CFLAGS := -Wall -Werror |
| 15 | # Tragically, the code is riddled with unused parameters. |
| 16 | LOCAL_CLANG_CFLAGS += -Wno-unused-parameter |
| 17 | # yacc dumps a lot of code *just in case*. |
| 18 | LOCAL_CLANG_CFLAGS += -Wno-unused-function |
| 19 | LOCAL_CLANG_CFLAGS += -Wno-unneeded-internal-declaration |
| 20 | # yacc is a tool from a more civilized age. |
| 21 | LOCAL_CLANG_CFLAGS += -Wno-deprecated-register |
| 22 | # yacc also has a habit of using char* over const char*. |
| 23 | LOCAL_CLANG_CFLAGS += -Wno-writable-strings |
| 24 | |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 25 | LOCAL_SRC_FILES := \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 26 | AST.cpp \ |
| 27 | Type.cpp \ |
| 28 | aidl.cpp \ |
| 29 | aidl_language.cpp \ |
| 30 | aidl_language_l.l \ |
| 31 | aidl_language_y.y \ |
| 32 | generate_java.cpp \ |
| 33 | generate_java_binder.cpp \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 34 | options.cpp \ |
| 35 | search_path.cpp \ |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 36 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 37 | include $(BUILD_HOST_STATIC_LIBRARY) |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 38 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 39 | |
| 40 | # aidl executable |
| 41 | include $(CLEAR_VARS) |
| 42 | LOCAL_MODULE := aidl |
| 43 | |
| 44 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 45 | LOCAL_CFLAGS := -Wall -Werror |
| 46 | LOCAL_SRC_FILES := main.cpp |
| 47 | LOCAL_STATIC_LIBRARIES := libaidl-common |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 48 | include $(BUILD_HOST_EXECUTABLE) |
| 49 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 50 | |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 51 | # TODO(wiley) Compile these for mac as well after b/22771504 |
| 52 | ifeq ($(HOST_OS),linux) |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 53 | # Unit tests |
| 54 | include $(CLEAR_VARS) |
| 55 | LOCAL_MODULE := aidl_unittests |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 56 | |
| 57 | LOCAL_CFLAGS := -g -DUNIT_TEST -Wall -Werror |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 58 | # Tragically, the code is riddled with unused parameters. |
| 59 | LOCAL_CLANG_CFLAGS := -Wno-unused-parameter |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 60 | LOCAL_SRC_FILES := \ |
| 61 | options_unittest.cpp \ |
| Christopher Wiley | f321efd | 2015-09-01 12:39:25 -0700 | [diff] [blame] | 62 | test_main.cpp \ |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 63 | tests/end_to_end_tests.cpp \ |
| 64 | tests/example_interface_test_data.cpp \ |
| 65 | |
| 66 | LOCAL_SHARED_LIBRARIES := \ |
| 67 | libchrome-host \ |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 68 | |
| 69 | LOCAL_STATIC_LIBRARIES := \ |
| 70 | libaidl-common \ |
| 71 | libgmock_host \ |
| 72 | libgtest_host \ |
| Christopher Wiley | f321efd | 2015-09-01 12:39:25 -0700 | [diff] [blame] | 73 | |
| Christopher Wiley | c545b7c | 2015-09-01 18:36:44 -0700 | [diff] [blame] | 74 | LOCAL_LDLIBS_linux := -lrt |
| 75 | |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 76 | include $(BUILD_HOST_NATIVE_TEST) |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 77 | endif # HOST_OS == linux |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 78 | |
| Ying Wang | c7cf53e | 2014-03-07 15:55:14 -0800 | [diff] [blame] | 79 | endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK |