[libpri-commits] rmudgett: branch 1.4 r2300 - /branches/1.4/Makefile
    SVN commits to the libpri project 
    libpri-commits at lists.digium.com
       
    Wed Sep 26 10:46:30 CDT 2012
    
    
  
Author: rmudgett
Date: Wed Sep 26 10:46:23 2012
New Revision: 2300
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2300
Log:
Allow passing compiler flags (CFLAGS, LDFLAGS)
(closes issue PRI-144)
Reported by: Tzafrir Cohen
Patches:
      flags.diff (license #5035) patch uploaded by Tzafrir Cohen
Modified:
    branches/1.4/Makefile
Modified: branches/1.4/Makefile
URL: http://svnview.digium.com/svn/libpri/branches/1.4/Makefile?view=diff&rev=2300&r1=2299&r2=2300
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Wed Sep 26 10:46:23 2012
@@ -66,18 +66,20 @@
 	version.o
 DYNAMIC_OBJS= \
 	$(STATIC_OBJS)
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
+CFLAGS ?= -g
+CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS += -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
 INSTALL_PREFIX=$(DESTDIR)
 INSTALL_BASE=/usr
 libdir?=$(INSTALL_BASE)/lib
 ifneq ($(findstring Darwin,$(OSARCH)),)
-  SOFLAGS=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
+  SOFLAGS=$(LDFLAGS) -dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
   ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
     SOFLAGS+=/usr/lib/bundle1.o
   endif
   LDCONFIG=/usr/bin/true
 else
-  SOFLAGS=-shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
+  SOFLAGS=$(LDFLAGS) -shared -Wl,-h$(DYNAMIC_LIBRARY) $(COVERAGE_LDFLAGS)
   LDCONFIG = /sbin/ldconfig
 endif
 ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX XGNUX))
    
    
More information about the libpri-commits
mailing list