From: Patrik Gornicz Date: Sun, 7 Jun 2009 23:08:53 +0000 (-0400) Subject: changed cxxflags for targets X-Git-Tag: libbear-premerge~70 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=9cc902bf682613962e36a2aa08bebdc93026ed60;p=libbear.git changed cxxflags for targets --- diff --git a/lib/vars.mk b/lib/vars.mk index 1fcbca2..5911177 100644 --- a/lib/vars.mk +++ b/lib/vars.mk @@ -58,22 +58,14 @@ includedir := ${prefix}/include libdir := ${exec_prefix}/lib INSTALL := install - -LIBFLAGS := -fPIC +# HACK needed for deps INCFLAGS := $(addprefix -I, ${INCDIRS}) -LNKFLAGS := -shared -Wl,-soname,${SONAME} -# setup CXXFLAGS specific to the library target and all prerequisites -${TARGET}: CXXFLAGS += ${LIBFLAGS} -ifeq (${BUILD},WIN32) -${TARGET}: CXXFLAGS += ${OPTFLAGS} -else -ifeq (${BUILD},FINAL) -${TARGET}: CXXFLAGS += ${OPTFLAGS} -else -${TARGET}: CXXFLAGS += ${DBGFLAGS} -endif -endif +# add flags specific to the library target and all prerequisites +${TARGET}: CXXFLAGS += -fPIC +${TARGET}: INCFLAGS += $(addprefix -I, ${INCDIRS}) +${TARGET}: LNKFLAGS += -shared -Wl,-soname,${SONAME} + # lists populated by dir.mk files in subdirectories SRCS := # := start diff --git a/vars.mk b/vars.mk index de72284..1df38df 100644 --- a/vars.mk +++ b/vars.mk @@ -5,6 +5,15 @@ PRFFLAGS := ${DBGFLAGS} -pg WARFLAGS := -Wall -Wextra -pedantic -ansi CXXFLAGS := ${WARFLAGS} +ifeq (${BUILD},WIN32) + CXXFLAGS += ${OPTFLAGS} +else +ifeq (${BUILD},FINAL) + CXXFLAGS += ${OPTFLAGS} +else + CXXFLAGS += ${DBGFLAGS} +endif +endif ifeq (${BUILD},WIN32) CXX := mingw32-g++