Allow custom CPU optimization flags

Added make variable LIBPRI_OPT to set optimization level. By default the
optimization level is now set to -O2.

(closes issue #12676)
Reported by: tzafrir
Patches:
      libpri_opt.diff uploaded by tzafrir (license 46)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@976 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Jeff Peeler 2009-08-18 20:59:32 +00:00
parent 13fbd05e0b
commit 926cc924d2

View File

@ -79,7 +79,7 @@ DYNAMIC_OBJS= \
rose_qsig_mwi.lo \
rose_qsig_name.lo \
version.lo
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS)
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) $(LIBPRI_OPT)
INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
libdir?=$(INSTALL_BASE)/lib
@ -110,7 +110,9 @@ PRIVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesnt support it.
ifeq ($(PROC),sparc64)
PROC=ultrasparc
CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
LIBPRI_OPT = -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
else
LIBPRI_OPT = -O2
endif
all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)