Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 1 | # |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 2 | # Copyright (C) 2011 The Android Open Source Project |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 18 | |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | LOCAL_SRC_FILES := \ |
Chia-chi Yeh | f8a6a76 | 2011-07-04 17:21:23 -0700 | [diff] [blame] | 22 | src/racoon/algorithm.c \ |
| 23 | src/racoon/crypto_openssl.c \ |
| 24 | src/racoon/genlist.c \ |
| 25 | src/racoon/handler.c \ |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 26 | src/racoon/isakmp.c \ |
| 27 | src/racoon/isakmp_agg.c \ |
| 28 | src/racoon/isakmp_base.c \ |
Chia-chi Yeh | 514ffe2 | 2011-07-07 13:52:27 -0700 | [diff] [blame] | 29 | src/racoon/isakmp_cfg.c \ |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 30 | src/racoon/isakmp_frag.c \ |
| 31 | src/racoon/isakmp_ident.c \ |
| 32 | src/racoon/isakmp_inf.c \ |
| 33 | src/racoon/isakmp_newg.c \ |
| 34 | src/racoon/isakmp_quick.c \ |
Chia-chi Yeh | 514ffe2 | 2011-07-07 13:52:27 -0700 | [diff] [blame] | 35 | src/racoon/isakmp_unity.c \ |
| 36 | src/racoon/isakmp_xauth.c \ |
Chia-chi Yeh | 2ff6ed0 | 2011-07-12 19:55:48 -0700 | [diff] [blame] | 37 | src/racoon/ipsec_doi.c \ |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 38 | src/racoon/nattraversal.c \ |
Chia-chi Yeh | f8a6a76 | 2011-07-04 17:21:23 -0700 | [diff] [blame] | 39 | src/racoon/oakley.c \ |
| 40 | src/racoon/pfkey.c \ |
| 41 | src/racoon/policy.c \ |
| 42 | src/racoon/proposal.c \ |
| 43 | src/racoon/remoteconf.c \ |
| 44 | src/racoon/schedule.c \ |
| 45 | src/racoon/sockmisc.c \ |
| 46 | src/racoon/str2val.c \ |
| 47 | src/racoon/strnames.c \ |
| 48 | src/racoon/vendorid.c \ |
| 49 | src/racoon/vmbuf.c \ |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 50 | main.c \ |
| 51 | setup.c |
| 52 | |
| 53 | LOCAL_C_INCLUDES += \ |
| 54 | $(LOCAL_PATH) \ |
| 55 | $(LOCAL_PATH)/src/include-glibc \ |
| 56 | $(LOCAL_PATH)/src/libipsec \ |
| 57 | $(LOCAL_PATH)/src/racoon \ |
Adam Langley | 329b118 | 2015-01-22 16:54:45 -0800 | [diff] [blame] | 58 | $(LOCAL_PATH)/src/racoon/missing |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 59 | |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 60 | LOCAL_STATIC_LIBRARIES := libipsec |
| 61 | |
Ying Wang | f4cb1ee | 2013-04-09 21:48:54 -0700 | [diff] [blame] | 62 | LOCAL_SHARED_LIBRARIES := libcutils liblog libcrypto |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 63 | |
Adam Langley | 329b118 | 2015-01-22 16:54:45 -0800 | [diff] [blame] | 64 | ifneq (,$(wildcard $(TOP)/external/boringssl/flavor.mk)) |
| 65 | include $(TOP)/external/boringssl/flavor.mk |
| 66 | else |
| 67 | include $(TOP)/external/openssl/flavor.mk |
| 68 | endif |
Adam Langley | a029281 | 2014-09-30 15:20:01 -0700 | [diff] [blame] | 69 | ifeq ($(OPENSSL_FLAVOR),BoringSSL) |
| 70 | LOCAL_SHARED_LIBRARIES += libkeystore-engine |
| 71 | endif |
| 72 | |
Elliott Hughes | 1bae6ac | 2015-01-26 13:29:19 -0800 | [diff] [blame] | 73 | LOCAL_CFLAGS := -DANDROID_CHANGES -DHAVE_CONFIG_H -DHAVE_OPENSSL_ENGINE_H -D_BSD_SOURCE=1 |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 74 | |
Adam Langley | a029281 | 2014-09-30 15:20:01 -0700 | [diff] [blame] | 75 | LOCAL_CFLAGS += -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pointer-sign -Werror |
Chia-chi Yeh | 514ffe2 | 2011-07-07 13:52:27 -0700 | [diff] [blame] | 76 | |
Andreas Gampe | a169bc0 | 2014-12-05 01:23:32 -0800 | [diff] [blame] | 77 | # Turn off unused XXX warnings. Should be removed/fixed when syncing with upstream. b/18523687, b/18632512 |
| 78 | LOCAL_CFLAGS += -Wno-unused-variable \ |
| 79 | -Wno-unused-but-set-variable \ |
| 80 | -Wno-unused-function \ |
| 81 | -Wno-unused-label \ |
| 82 | -Wno-unused-value |
Andreas Gampe | af1ce1a | 2014-11-25 11:54:06 -0800 | [diff] [blame] | 83 | |
Chih-Hung Hsieh | 179de0d | 2014-10-22 15:12:13 -0700 | [diff] [blame] | 84 | # pfkey.c, isakmp.c, remoteconf.c have some K&R warnings, |
| 85 | # to be ignored until they are fixed from upstream. |
| 86 | LOCAL_CLANG_CFLAGS += -Wno-knr-promoted-parameter |
| 87 | |
Chia-chi Yeh | 458fe1e | 2009-06-26 14:36:17 +0800 | [diff] [blame] | 88 | LOCAL_MODULE := racoon |
| 89 | |
| 90 | include $(BUILD_EXECUTABLE) |
| 91 | |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 92 | ########################################################################## |
| 93 | |
| 94 | include $(CLEAR_VARS) |
| 95 | |
| 96 | LOCAL_SRC_FILES := \ |
| 97 | src/libipsec/pfkey.c \ |
| 98 | src/libipsec/ipsec_strerror.c |
| 99 | |
Adam Langley | a029281 | 2014-09-30 15:20:01 -0700 | [diff] [blame] | 100 | LOCAL_CFLAGS := -DANDROID_CHANGES -DHAVE_CONFIG_H -DHAVE_OPENSSL_ENGINE_H |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 101 | |
Adam Langley | a029281 | 2014-09-30 15:20:01 -0700 | [diff] [blame] | 102 | LOCAL_CFLAGS += -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pointer-sign -Werror |
Chia-chi Yeh | 514ffe2 | 2011-07-07 13:52:27 -0700 | [diff] [blame] | 103 | |
Chih-Hung Hsieh | 179de0d | 2014-10-22 15:12:13 -0700 | [diff] [blame] | 104 | # pfkey.c has some K&R warnings, |
| 105 | # to be ignored until they are fixed from upstream. |
| 106 | LOCAL_CLANG_CFLAGS += -Wno-knr-promoted-parameter |
| 107 | |
Chia-chi Yeh | 96869bd | 2011-03-23 11:32:28 -0700 | [diff] [blame] | 108 | LOCAL_C_INCLUDES += \ |
| 109 | $(LOCAL_PATH) \ |
| 110 | $(LOCAL_PATH)/src/include-glibc \ |
| 111 | $(LOCAL_PATH)/src/libipsec |
| 112 | |
| 113 | LOCAL_MODULE := libipsec |
| 114 | |
| 115 | LOCAL_MODULE_TAGS := optional |
| 116 | |
| 117 | include $(BUILD_STATIC_LIBRARY) |