scepclient: Added support to build it on Android

This commit is contained in:
Tobias Brunner 2012-06-14 18:35:58 +02:00
parent 197dbf5f72
commit 67307ad724
3 changed files with 46 additions and 4 deletions

View File

@ -5,11 +5,14 @@ include $(CLEAR_VARS)
# to PRODUCT_PACKAGES in
# build/target/product/core.mk
# possible executables are
# starter - allows to control and configure the daemons from the command line
# starter - allows to control and configure the daemon from the command line
# charon - the IKE daemon
# scepclient - SCEP client
# if you enable starter (see above) uncomment this line too
# if you enable starter or scepclient (see above) uncomment the proper
# lines here
# strongswan_BUILD_STARTER := true
# strongswan_BUILD_SCEPCLIENT := true
# this is the list of plugins that are built into libstrongswan and charon
# also these plugins are loaded by default (if not changed in strongswan.conf)
@ -17,11 +20,17 @@ strongswan_CHARON_PLUGINS := openssl fips-prf random pubkey pkcs1 \
pem xcbc hmac kernel-netlink socket-default android \
stroke eap-identity eap-mschapv2 eap-md5
ifneq ($(strongswan_BUILD_SCEPCLIENT),)
# plugins loaded by scepclient
strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pem
endif
strongswan_STARTER_PLUGINS := kernel-netlink
# list of all plugins - used to enable them with the function below
strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
$(strongswan_STARTER_PLUGINS))
$(strongswan_STARTER_PLUGINS) \
$(strongswan_SCEPCLIENT_PLUGINS))
# helper macros to only add source files for plugins included in the list above
# source files are relative to the android.mk that called the macro
@ -109,5 +118,10 @@ strongswan_BUILD += \
ipsec
endif
ifneq ($(strongswan_BUILD_SCEPCLIENT),)
strongswan_BUILD += \
scepclient
endif
include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
$(sort $(strongswan_BUILD))))

27
src/scepclient/Android.mk Normal file
View File

@ -0,0 +1,27 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# copy-n-paste from Makefile.am
LOCAL_SRC_FILES := \
scepclient.c scep.c scep.h
# build scepclient -------------------------------------------------------------
LOCAL_C_INCLUDES += \
$(libvstr_PATH) \
$(strongswan_PATH)/src/libstrongswan
LOCAL_CFLAGS := $(strongswan_CFLAGS) \
-DPLUGINS='"$(strongswan_SCEPCLIENT_PLUGINS)"'
LOCAL_MODULE := scepclient
LOCAL_MODULE_TAGS := optional
LOCAL_ARM_MODE := arm
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES += libstrongswan
include $(BUILD_EXECUTABLE)

View File

@ -1,5 +1,6 @@
ipsec_PROGRAMS = scepclient
scepclient_SOURCES = scepclient.c scep.c scep.h
scepclient_SOURCES = \
scepclient.c scep.c scep.h
scepclient.o : $(top_builddir)/config.status