Android.mk 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. LOCAL_PATH := $(call my-dir)
  2. include $(CLEAR_VARS)
  3. # the executables that should be installed on the final system have to be added
  4. # to PRODUCT_PACKAGES in
  5. # build/target/product/core.mk
  6. # possible executables are
  7. # starter - allows to control and configure the daemon from the command line
  8. # charon - the IKE daemon
  9. # scepclient - SCEP client
  10. # if you enable starter or scepclient (see above) uncomment the proper
  11. # lines here
  12. # strongswan_BUILD_STARTER := true
  13. # strongswan_BUILD_SCEPCLIENT := true
  14. # this is the list of plugins that are built into libstrongswan and charon
  15. # also these plugins are loaded by default (if not changed in strongswan.conf)
  16. strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
  17. pkcs1 pkcs8 pem xcbc hmac kernel-netlink socket-default android-dns \
  18. stroke eap-identity eap-mschapv2 eap-md5 eap-gtc
  19. ifneq ($(strongswan_BUILD_SCEPCLIENT),)
  20. # plugins loaded by scepclient
  21. strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pkcs7 pem
  22. endif
  23. strongswan_STARTER_PLUGINS := kernel-netlink
  24. # list of all plugins - used to enable them with the function below
  25. strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
  26. $(strongswan_STARTER_PLUGINS) \
  27. $(strongswan_SCEPCLIENT_PLUGINS))
  28. include $(LOCAL_PATH)/Android.common.mk
  29. # includes
  30. strongswan_PATH := $(LOCAL_PATH)
  31. libcurl_PATH := external/strongswan-support/libcurl/include
  32. libgmp_PATH := external/strongswan-support/gmp
  33. openssl_PATH := external/openssl/include
  34. # some definitions
  35. strongswan_DIR := "/system/bin"
  36. strongswan_SBINDIR := "/system/bin"
  37. strongswan_PIDDIR := "/data/misc/vpn"
  38. strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
  39. strongswan_CONFDIR := "/system/etc"
  40. strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
  41. # CFLAGS (partially from a configure run using droid-gcc)
  42. strongswan_CFLAGS := \
  43. -Wno-format \
  44. -Wno-pointer-sign \
  45. -Wno-pointer-arith \
  46. -Wno-sign-compare \
  47. -Wno-strict-aliasing \
  48. -DHAVE___BOOL \
  49. -DHAVE_STDBOOL_H \
  50. -DHAVE_ALLOCA_H \
  51. -DHAVE_ALLOCA \
  52. -DHAVE_CLOCK_GETTIME \
  53. -DHAVE_DLADDR \
  54. -DHAVE_PRCTL \
  55. -DHAVE_LINUX_UDP_H \
  56. -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
  57. -DHAVE_IPSEC_MODE_BEET \
  58. -DHAVE_IPSEC_DIR_FWD \
  59. -DOPENSSL_NO_ENGINE \
  60. -DCONFIG_H_INCLUDED \
  61. -DCAPABILITIES \
  62. -DCAPABILITIES_NATIVE \
  63. -DMONOLITHIC \
  64. -DUSE_IKEV1 \
  65. -DUSE_IKEV2 \
  66. -DUSE_BUILTIN_PRINTF \
  67. -DDEBUG \
  68. -DROUTING_TABLE=0 \
  69. -DROUTING_TABLE_PRIO=220 \
  70. -DVERSION=\"$(strongswan_VERSION)\" \
  71. -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
  72. -DIPSEC_DIR=\"$(strongswan_DIR)\" \
  73. -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
  74. -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
  75. -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
  76. -DDEV_RANDOM=\"/dev/random\" \
  77. -DDEV_URANDOM=\"/dev/urandom\"
  78. # only for Android 2.0+
  79. strongswan_CFLAGS += \
  80. -DHAVE_IN6ADDR_ANY
  81. strongswan_BUILD := \
  82. charon \
  83. libcharon \
  84. libstrongswan \
  85. libtncif \
  86. libtnccs \
  87. libimcv \
  88. libtpmtss
  89. ifneq ($(strongswan_BUILD_STARTER),)
  90. strongswan_BUILD += \
  91. starter \
  92. stroke \
  93. ipsec
  94. endif
  95. ifneq ($(strongswan_BUILD_SCEPCLIENT),)
  96. strongswan_BUILD += \
  97. scepclient
  98. endif
  99. include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
  100. $(sort $(strongswan_BUILD))))