Skip to content

Commit

Permalink
Clean up make files
Browse files Browse the repository at this point in the history
Remove obsolete settings for ART on KitKat, add some for Marshmallow.
Also adjust whitespace to two leading spaces.
  • Loading branch information
rovo89 committed Nov 11, 2015
1 parent d0551cc commit f1aba39
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 75 deletions.
54 changes: 26 additions & 28 deletions ART.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,49 @@

include $(CLEAR_VARS)

ifeq ($(PLATFORM_SDK_VERSION),19)
include art/build/Android.common.mk
LOCAL_CLANG := $(ART_TARGET_CLANG)
LOCAL_CFLAGS := $(ART_TARGET_CFLAGS) $(ART_TARGET_NON_DEBUG_CFLAGS)

include external/stlport/libstlport.mk
include art/build/Android.common_build.mk
$(eval $(call set-target-local-clang-vars))
$(eval $(call set-target-local-cflags-vars,ndebug))

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 23)))
LOCAL_C_INCLUDES += \
external/valgrind \
external/valgrind/include
else
include art/build/Android.common_build.mk
$(eval $(call set-target-local-clang-vars))
$(eval $(call set-target-local-cflags-vars,ndebug))

include external/libcxx/libcxx.mk
LOCAL_C_INCLUDES += \
external/valgrind/main \
external/valgrind/main/include
LOCAL_MULTILIB := both
include external/libcxx/libcxx.mk
LOCAL_C_INCLUDES += \
external/valgrind/main \
external/valgrind/main/include
endif

LOCAL_SRC_FILES += \
libxposed_common.cpp \
libxposed_art.cpp
libxposed_common.cpp \
libxposed_art.cpp

LOCAL_C_INCLUDES += \
art/runtime \
external/gtest/include
art/runtime \
external/gtest/include

LOCAL_SHARED_LIBRARIES += \
libart \
liblog \
libcutils \
libandroidfw \
libnativehelper
libart \
liblog \
libcutils \
libandroidfw \
libnativehelper

LOCAL_CFLAGS += \
-Wno-unused-parameter \
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
-DXPOSED_WITH_SELINUX=1
-Wno-unused-parameter \
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
-DXPOSED_WITH_SELINUX=1

LOCAL_MODULE := libxposed_art
LOCAL_MODULE_TAGS := optional
LOCAL_STRIP_MODULE := keep_symbols
LOCAL_MULTILIB := both

# Always build both architecture (if applicable)
ifeq ($(TARGET_IS_64_BIT),true)
$(LOCAL_MODULE): $(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX)
$(LOCAL_MODULE): $(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX)
endif

include $(BUILD_SHARED_LIBRARY)
58 changes: 26 additions & 32 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 21)))
LOCAL_SRC_FILES := app_main2.cpp
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := app_process32_xposed
LOCAL_MODULE_STEM_64 := app_process64_xposed
LOCAL_SRC_FILES := app_main2.cpp
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := app_process32_xposed
LOCAL_MODULE_STEM_64 := app_process64_xposed
else
LOCAL_SRC_FILES := app_main.cpp
LOCAL_MODULE_STEM := app_process_xposed
LOCAL_SRC_FILES := app_main.cpp
LOCAL_MODULE_STEM := app_process_xposed
endif

LOCAL_SRC_FILES += \
xposed.cpp \
xposed_logcat.cpp \
xposed_service.cpp \
xposed_safemode.cpp
xposed.cpp \
xposed_logcat.cpp \
xposed_service.cpp \
xposed_safemode.cpp

LOCAL_SHARED_LIBRARIES := \
libcutils \
libutils \
liblog \
libbinder \
libandroid_runtime \
libdl
libcutils \
libutils \
liblog \
libbinder \
libandroid_runtime \
libdl

LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 17)))
LOCAL_SHARED_LIBRARIES += libselinux
LOCAL_CFLAGS += -DXPOSED_WITH_SELINUX=1
LOCAL_SHARED_LIBRARIES += libselinux
LOCAL_CFLAGS += -DXPOSED_WITH_SELINUX=1
endif

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 22)))
LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
endif

LOCAL_MODULE := xposed
Expand All @@ -47,22 +47,16 @@ LOCAL_STRIP_MODULE := keep_symbols

# Always build both architecture (if applicable)
ifeq ($(TARGET_IS_64_BIT),true)
$(LOCAL_MODULE): $(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX)
$(LOCAL_MODULE): $(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX)
endif

include $(BUILD_EXECUTABLE)

##########################################################
# Library for Dalvik-specific functions
# Library for Dalvik-/ART-specific functions
##########################################################
ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \< 21)))
include frameworks/base/cmds/xposed/Dalvik.mk
endif

##########################################################
# Library for ART-specific functions
##########################################################

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 19)))
include frameworks/base/cmds/xposed/ART.mk
ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 21)))
include frameworks/base/cmds/xposed/ART.mk
else
include frameworks/base/cmds/xposed/Dalvik.mk
endif
30 changes: 15 additions & 15 deletions Dalvik.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
libxposed_common.cpp \
libxposed_dalvik.cpp
libxposed_common.cpp \
libxposed_dalvik.cpp

LOCAL_C_INCLUDES += \
dalvik \
dalvik/vm \
external/stlport/stlport \
bionic \
bionic/libstdc++/include \
libcore/include
dalvik \
dalvik/vm \
external/stlport/stlport \
bionic \
bionic/libstdc++/include \
libcore/include

LOCAL_SHARED_LIBRARIES := \
libdvm \
liblog \
libdl \
libnativehelper
libdvm \
liblog \
libdl \
libnativehelper

ifeq ($(PLATFORM_SDK_VERSION),15)
LOCAL_SHARED_LIBRARIES += libutils
LOCAL_SHARED_LIBRARIES += libutils
else
LOCAL_SHARED_LIBRARIES += libandroidfw
LOCAL_SHARED_LIBRARIES += libandroidfw
endif

LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)

ifeq (1,$(strip $(shell expr $(PLATFORM_SDK_VERSION) \>= 17)))
LOCAL_CFLAGS += -DXPOSED_WITH_SELINUX=1
LOCAL_CFLAGS += -DXPOSED_WITH_SELINUX=1
endif

LOCAL_MODULE := libxposed_dalvik
Expand Down

0 comments on commit f1aba39

Please sign in to comment.