| 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 | |
| Christopher Wiley | b8b59f6 | 2015-09-15 12:19:53 -0700 | [diff] [blame] | 10 | aidl_static_libraries := libbase libcutils |
| Christopher Wiley | 7c3a1eb | 2015-09-12 10:19:52 -0700 | [diff] [blame] | 11 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 12 | # Logic shared between aidl and its unittests |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 13 | include $(CLEAR_VARS) |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 14 | LOCAL_MODULE := libaidl-common |
| Dan Willemsen | eada025 | 2015-09-04 14:21:26 -0700 | [diff] [blame] | 15 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 16 | |
| Christopher Wiley | 4427d86 | 2015-09-14 11:07:39 -0700 | [diff] [blame] | 17 | LOCAL_C_INCLUDES := external/gtest/include |
| Christopher Wiley | e0146cf | 2015-08-24 15:06:58 -0700 | [diff] [blame] | 18 | LOCAL_CLANG_CFLAGS := -Wall -Werror |
| 19 | # Tragically, the code is riddled with unused parameters. |
| 20 | LOCAL_CLANG_CFLAGS += -Wno-unused-parameter |
| 21 | # yacc dumps a lot of code *just in case*. |
| 22 | LOCAL_CLANG_CFLAGS += -Wno-unused-function |
| 23 | LOCAL_CLANG_CFLAGS += -Wno-unneeded-internal-declaration |
| 24 | # yacc is a tool from a more civilized age. |
| 25 | LOCAL_CLANG_CFLAGS += -Wno-deprecated-register |
| 26 | # yacc also has a habit of using char* over const char*. |
| 27 | LOCAL_CLANG_CFLAGS += -Wno-writable-strings |
| Christopher Wiley | 7c3a1eb | 2015-09-12 10:19:52 -0700 | [diff] [blame] | 28 | LOCAL_STATIC_LIBRARIES := $(aidl_static_libraries) |
| Christopher Wiley | e0146cf | 2015-08-24 15:06:58 -0700 | [diff] [blame] | 29 | |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 30 | LOCAL_SRC_FILES := \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 31 | aidl.cpp \ |
| 32 | aidl_language.cpp \ |
| 33 | aidl_language_l.l \ |
| 34 | aidl_language_y.y \ |
| Christopher Wiley | f600a55 | 2015-09-12 14:07:44 -0700 | [diff] [blame] | 35 | ast_cpp.cpp \ |
| Christopher Wiley | 038485e | 2015-09-12 11:14:14 -0700 | [diff] [blame] | 36 | ast_java.cpp \ |
| Christopher Wiley | fdeb0f4 | 2015-09-11 15:38:22 -0700 | [diff] [blame] | 37 | code_writer.cpp \ |
| Christopher Wiley | eb1acc1 | 2015-09-16 11:25:13 -0700 | [diff] [blame] | 38 | generate_cpp.cpp \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 39 | generate_java.cpp \ |
| 40 | generate_java_binder.cpp \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 41 | options.cpp \ |
| Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 42 | parse_helpers.cpp \ |
| Christopher Wiley | 89e3586 | 2015-08-30 10:57:07 -0700 | [diff] [blame] | 43 | search_path.cpp \ |
| Christopher Wiley | 775fa1f | 2015-09-22 15:00:12 -0700 | [diff] [blame] | 44 | type_java.cpp \ |
| Christopher Wiley | fb4b22d | 2015-09-25 15:16:13 -0700 | [diff] [blame^] | 45 | type_namespace.cpp \ |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 46 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 47 | include $(BUILD_HOST_STATIC_LIBRARY) |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 48 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 49 | |
| 50 | # aidl executable |
| 51 | include $(CLEAR_VARS) |
| 52 | LOCAL_MODULE := aidl |
| 53 | |
| 54 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 55 | LOCAL_CFLAGS := -Wall -Werror |
| Christopher Wiley | 4427d86 | 2015-09-14 11:07:39 -0700 | [diff] [blame] | 56 | LOCAL_C_INCLUDES := external/gtest/include |
| Christopher Wiley | 89eaab5 | 2015-09-15 14:46:46 -0700 | [diff] [blame] | 57 | LOCAL_SRC_FILES := main_java.cpp |
| Christopher Wiley | 7c3a1eb | 2015-09-12 10:19:52 -0700 | [diff] [blame] | 58 | LOCAL_STATIC_LIBRARIES := libaidl-common $(aidl_static_libraries) |
| The Android Open Source Project | 46c012c | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 59 | include $(BUILD_HOST_EXECUTABLE) |
| 60 | |
| Christopher Wiley | a590de8 | 2015-09-15 15:46:28 -0700 | [diff] [blame] | 61 | # aidl-cpp executable |
| 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := aidl-cpp |
| 64 | |
| 65 | LOCAL_MODULE_HOST_OS := darwin linux windows |
| 66 | LOCAL_CFLAGS := -Wall -Werror |
| 67 | LOCAL_C_INCLUDES := external/gtest/include |
| 68 | LOCAL_SRC_FILES := main_cpp.cpp |
| 69 | LOCAL_STATIC_LIBRARIES := libaidl-common $(aidl_static_libraries) |
| 70 | include $(BUILD_HOST_EXECUTABLE) |
| 71 | |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 72 | |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 73 | # TODO(wiley) Compile these for mac as well after b/22771504 |
| 74 | ifeq ($(HOST_OS),linux) |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 75 | # Unit tests |
| 76 | include $(CLEAR_VARS) |
| 77 | LOCAL_MODULE := aidl_unittests |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 78 | |
| 79 | LOCAL_CFLAGS := -g -DUNIT_TEST -Wall -Werror |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 80 | # Tragically, the code is riddled with unused parameters. |
| 81 | LOCAL_CLANG_CFLAGS := -Wno-unused-parameter |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 82 | LOCAL_SRC_FILES := \ |
| Christopher Wiley | f600a55 | 2015-09-12 14:07:44 -0700 | [diff] [blame] | 83 | ast_cpp_unittest.cpp \ |
| Christopher Wiley | fdeb0f4 | 2015-09-11 15:38:22 -0700 | [diff] [blame] | 84 | ast_java_unittest.cpp \ |
| Casey Dahlin | a834dd4 | 2015-09-23 11:52:15 -0700 | [diff] [blame] | 85 | generate_cpp_unittest.cpp \ |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 86 | options_unittest.cpp \ |
| Christopher Wiley | f690be5 | 2015-09-14 15:19:10 -0700 | [diff] [blame] | 87 | parse_helpers_unittest.cpp \ |
| Christopher Wiley | f321efd | 2015-09-01 12:39:25 -0700 | [diff] [blame] | 88 | test_main.cpp \ |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 89 | tests/end_to_end_tests.cpp \ |
| 90 | tests/example_interface_test_data.cpp \ |
| Christopher Wiley | 4582ecb | 2015-09-25 13:27:45 -0700 | [diff] [blame] | 91 | type_java_unittest.cpp \ |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 92 | |
| 93 | LOCAL_SHARED_LIBRARIES := \ |
| 94 | libchrome-host \ |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 95 | |
| 96 | LOCAL_STATIC_LIBRARIES := \ |
| 97 | libaidl-common \ |
| Christopher Wiley | 7c3a1eb | 2015-09-12 10:19:52 -0700 | [diff] [blame] | 98 | $(aidl_static_libraries) \ |
| Christopher Wiley | 3616d13 | 2015-09-01 11:07:48 -0700 | [diff] [blame] | 99 | libgmock_host \ |
| 100 | libgtest_host \ |
| Christopher Wiley | f321efd | 2015-09-01 12:39:25 -0700 | [diff] [blame] | 101 | |
| Christopher Wiley | c545b7c | 2015-09-01 18:36:44 -0700 | [diff] [blame] | 102 | LOCAL_LDLIBS_linux := -lrt |
| 103 | |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 104 | include $(BUILD_HOST_NATIVE_TEST) |
| Christopher Wiley | 856a869 | 2015-08-31 17:36:41 -0700 | [diff] [blame] | 105 | endif # HOST_OS == linux |
| Casey Dahlin | d8cc509 | 2015-08-28 15:46:48 -0700 | [diff] [blame] | 106 | |
| Ying Wang | c7cf53e | 2014-03-07 15:55:14 -0800 | [diff] [blame] | 107 | endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK |