link time optimization only for static libs

This commit is contained in:
Emiel Bruijntjes 2014-07-25 09:34:01 +02:00
parent 3a700226c8
commit 850252e1dd
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
CPP = g++
RM = rm -f
CPPFLAGS = -Wall -c -I. -g -flto -std=c++11 -g
CPPFLAGS = -Wall -c -I. -g -std=c++11 -g
LD = g++
LD_FLAGS = -Wall -shared -O2
SHARED_LIB = libamqpcpp.so
@ -25,7 +25,7 @@ clean:
${RM} *.obj *~* ${SHARED_OBJECTS} ${STATIC_OBJECTS} ${SHARED_LIB} ${STATIC_LIB}
${SHARED_OBJECTS}:
${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}
${CPP} ${CPPFLAGS} -flto -fpic -o $@ ${@:%.o=%.cpp}
${STATIC_OBJECTS}:
${CPP} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp}