Allow user to specify compiler optimization flags via CFLAGS at compile time. suggested by Ole André Vadla Ravnås

This commit is contained in:
Nguyen Anh Quynh 2014-04-29 07:11:55 +08:00
parent 2c5e3e5833
commit 77af9fb9c6

View File

@ -16,16 +16,19 @@ RANLIB = $(CROSS)ranlib
STRIP = $(CROSS)strip
endif
CFLAGS += -fPIC -O3 -Wall -Iinclude
ifneq (,$(findstring yes,$(CAPSTONE_DIET)))
CFLAGS ?= -Os
CFLAGS += -DCAPSTONE_DIET
else
CFLAGS ?= -O3
endif
CFLAGS += -fPIC -Wall -Iinclude
ifeq ($(USE_SYS_DYN_MEM),yes)
CFLAGS += -DUSE_SYS_DYN_MEM
endif
ifneq (,$(findstring yes,$(CAPSTONE_DIET)))
CFLAGS += -DCAPSTONE_DIET -Os
endif
PREFIX ?= /usr
DESTDIR ?=
INCDIR = $(DESTDIR)$(PREFIX)/include