try to simplify makefiles

This commit is contained in:
Edouard DUPIN 2012-07-17 13:41:21 +02:00
parent 95f92bc793
commit 65c901e41f
156 changed files with 62 additions and 77 deletions

View File

@ -1,32 +1,9 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# name of the librairy
LOCAL_MODULE := agg
# name of the dependency
LOCAL_STATIC_LIBRARIES := libfreetype
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/agg-2.4/ \
$(LOCAL_PATH)/agg-2.4/util/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
ifeq ($(DEBUG),1)
LOCAL_CFLAGS := -D__PLATFORM__Android \
-DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"2.4-debug\""
else
LOCAL_CFLAGS := -D__PLATFORM__Android \
-DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"2.4-release\""
endif
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
include $(LOCAL_PATH)/Generic.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_CFLAGS += -D__PLATFORM__Android
include $(BUILD_STATIC_LIBRARY)

31
Generic.mk Normal file
View File

@ -0,0 +1,31 @@
# get the tag of the current project :
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
# name of the librairy
LOCAL_MODULE := agg
# name of the dependency
LOCAL_STATIC_LIBRARIES := libfreetype
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/agg/ \
$(LOCAL_PATH)/agg/util/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
ifeq ($(DEBUG),1)
LOCAL_CFLAGS := -DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-debug\""
else
LOCAL_CFLAGS := -DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-release\""
endif
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
LOCAL_SRC_FILES := $(FILE_LIST)

View File

@ -1,32 +1,9 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# name of the librairy
LOCAL_MODULE := agg
# name of the dependency
LOCAL_STATIC_LIBRARIES := libfreetype
LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/agg-2.4/ \
$(LOCAL_PATH)/agg-2.4/util/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
ifeq ($(DEBUG),1)
LOCAL_CFLAGS := -D__PLATFORM__Linux \
-DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"2.4-debug\""
else
LOCAL_CFLAGS := -D__PLATFORM__Linux \
-DAGG_DEBUG_LEVEL=3 \
-DAGG_VERSION_TAG_NAME="\"2.4-release\""
endif
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk
include $(LOCAL_PATH)/Generic.mk
LOCAL_SRC_FILES := $(FILE_LIST)
LOCAL_CFLAGS += -D__PLATFORM__Linux
include $(BUILD_STATIC_LIBRARY)

Some files were not shown because too many files have changed in this diff Show More