Android.mk: add a flag to control shared/static lib
authorJames Zern <jzern@google.com>
Thu, 9 Apr 2015 04:03:36 +0000 (21:03 -0700)
committerJames Zern <jzern@google.com>
Thu, 9 Apr 2015 04:03:36 +0000 (21:03 -0700)
ndk-build ENABLE_SHARED=1 ...

Change-Id: Idd64804b165d0d4bbfb0b242d6c4eee5e828dab4

build/make/Android.mk

index d897b44..3d3f57d 100644 (file)
@@ -184,7 +184,11 @@ clean:
        @$(RM) -r $(ASM_CNV_PATH)
        @$(RM) $(CLEAN-OBJS)
 
-include $(BUILD_SHARED_LIBRARY)
+ifeq ($(ENABLE_SHARED),1)
+  include $(BUILD_SHARED_LIBRARY)
+else
+  include $(BUILD_STATIC_LIBRARY)
+endif
 
 ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
 $(call import-module,cpufeatures)