rename USE_SYS_DYN_MEM to CAPSTONE_USE_SYS_DYN_MEM for consistency with other options

This commit is contained in:
Nguyen Anh Quynh 2014-04-29 14:25:15 +08:00
parent 38863f20b9
commit e31327da14
3 changed files with 9 additions and 9 deletions

View File

@ -18,14 +18,14 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
Capstone supports 4 options, as followings. Capstone supports 4 options, as followings.
- CAPSTONE_ARCHS: specify list of architectures to compiled in. - CAPSTONE_ARCHS: specify list of architectures to compiled in.
- USE_SYS_DYN_MEM: change this if you have your own dynamic memory management. - CAPSTONE_USE_SYS_DYN_MEM: change this if you have your own dynamic memory management.
- CAPSTONE_DIET: use this to make the output binaries more compact. - CAPSTONE_DIET: use this to make the output binaries more compact.
- CAPSTONE_X86_REDUCE: another option to make X86 binary smaller. - CAPSTONE_X86_REDUCE: another option to make X86 binary smaller.
To avoid editing config.mk for these customization, can pass their values to To avoid editing config.mk for these customization, can pass their values to
make.sh, as followings. make.sh, as followings.
$ CAPSTONE_ARCHS="arm aarch64 x86" USE_SYS_DYN_MEM=no CAPSTONE_DIET=yes CAPSTONE_X86_REDUCE=yes ./make.sh $ CAPSTONE_ARCHS="arm aarch64 x86" CAPSTONE_USE_SYS_DYN_MEM=no CAPSTONE_DIET=yes CAPSTONE_X86_REDUCE=yes ./make.sh
NOTE: on commandline, put these values in front of ./make.sh, not after it. NOTE: on commandline, put these values in front of ./make.sh, not after it.

View File

@ -25,7 +25,7 @@ endif
CFLAGS += -fPIC -Wall -Iinclude CFLAGS += -fPIC -Wall -Iinclude
ifeq ($(USE_SYS_DYN_MEM),yes) ifeq ($(CAPSTONE_USE_SYS_DYN_MEM),yes)
CFLAGS += -DUSE_SYS_DYN_MEM CFLAGS += -DUSE_SYS_DYN_MEM
endif endif
@ -205,9 +205,9 @@ VERSION_EXT = $(API_MAJOR).$(EXT)
LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR) LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
AR_EXT = a AR_EXT = a
# Homebrew wants to make sure its formula does not disable FORTIFY_SOURCE # Homebrew wants to make sure its formula does not disable FORTIFY_SOURCE
# However, this is not really necessary because 'USE_SYS_DYN_MEM=yes' by default # However, this is not really necessary because 'CAPSTONE_USE_SYS_DYN_MEM=yes' by default
ifneq ($(HOMEBREW_CAPSTONE),1) ifneq ($(HOMEBREW_CAPSTONE),1)
ifneq ($(USE_SYS_DYN_MEM),yes) ifneq ($(CAPSTONE_USE_SYS_DYN_MEM),yes)
# remove string check because OSX kernel complains about missing symbols # remove string check because OSX kernel complains about missing symbols
CFLAGS += -D_FORTIFY_SOURCE=0 CFLAGS += -D_FORTIFY_SOURCE=0
endif endif

View File

@ -8,14 +8,14 @@ CAPSTONE_ARCHS ?= arm aarch64 mips powerpc sparc systemz x86
################################################################################ ################################################################################
# Comment out the line below ('USE_SYS_DYN_MEM = yes'), or change it to # Comment out the line below ('CAPSTONE_USE_SYS_DYN_MEM = yes'), or change it to
# 'USE_SYS_DYN_MEM = no' if do NOT use malloc/calloc/realloc/free/vsnprintf() # 'CAPSTONE_USE_SYS_DYN_MEM = no' if do NOT use malloc/calloc/realloc/free/
# provided by system for internal dynamic memory management. # vsnprintf() provided by system for internal dynamic memory management.
# #
# NOTE: in that case, specify your own malloc/calloc/realloc/free/vsnprintf() # NOTE: in that case, specify your own malloc/calloc/realloc/free/vsnprintf()
# functions in your program via API cs_option(), using CS_OPT_MEM option type. # functions in your program via API cs_option(), using CS_OPT_MEM option type.
USE_SYS_DYN_MEM ?= yes CAPSTONE_USE_SYS_DYN_MEM ?= yes
################################################################################ ################################################################################