Browse Source

lpac-jni: Android.mk: Do not depend on UNIX shell

...instead, the wildcard function is more than enough for the purpose
here.
Peter Cai 2 years ago
parent
commit
a25d23b979
1 changed files with 3 additions and 10 deletions
  1. 3 10
      libs/lpac-jni/src/main/jni/Android.mk

+ 3 - 10
libs/lpac-jni/src/main/jni/Android.mk

@@ -1,14 +1,9 @@
 LOCAL_PATH := $(call my-dir)
 LOCAL_PATH := $(call my-dir)
 
 
-ifeq ($(OS),Windows_NT)
-$(error "Building on Windows is unsupported")
-endif
-
 # function to find all *.c files under a directory
 # function to find all *.c files under a directory
 define all-c-files-under
 define all-c-files-under
-$(patsubst ./%,%, \
-  $(shell cd $(LOCAL_PATH) ; \
-          find $(1) -name "*.c" -and -not -name ".*" -maxdepth 1) \
+$(patsubst $(LOCAL_PATH)/%,%, \
+  $(wildcard $(LOCAL_PATH)/$(strip $(1))/*.c) \
  )
  )
 endef
 endef
 
 
@@ -45,7 +40,5 @@ LOCAL_STATIC_LIBRARIES := lpac-euicc
 LOCAL_C_INCLUDES := \
 LOCAL_C_INCLUDES := \
 	$(LOCAL_PATH)/lpac
 	$(LOCAL_PATH)/lpac
 LOCAL_SRC_FILES := \
 LOCAL_SRC_FILES := \
-	lpac-jni/lpac-jni.c \
-	lpac-jni/lpac-download.c \
-	lpac-jni/interface-wrapper.c
+	$(call all-c-files-under, lpac-jni)
 include $(BUILD_SHARED_LIBRARY)
 include $(BUILD_SHARED_LIBRARY)