From: Patrik Gornicz Date: Tue, 28 Apr 2009 21:40:13 +0000 (-0400) Subject: changes to soname of lib X-Git-Tag: libbear-premerge~101 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=eb6016d84a1ebf6ec837d6cbabe1931f40e7232d;p=libbear.git changes to soname of lib --- diff --git a/Makefile b/Makefile index f5a4664..7376d82 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ LIBS := ${LIBSDL} ${LIBGL} OPTFLAGS := -O2 DBGFLAGS := -ggdb PRFFLAGS := ${DBGFLAGS} -pg -MYFLAGS := -Wall -pedantic -ansi +MYFLAGS := -Wall -pedantic -ansi -fPIC VALFLAGS := --leak-check=full CXXFLAGS := ${MYFLAGS} ${DBGFLAGS} @@ -30,9 +30,12 @@ include ${SRCSDIR}${DIRMK} WORKINGDIR := bind/ -TARGETNAME := libpg.so -TARGETTMP := ${OBJSDIR}${TARGETNAME} -TARGET := ${WORKINGDIR}${TARGETNAME} +LINKERNAME := libpg.so +SONAME := libpg.so.1 +REALNAME := libpg.so.1.0 + +TARGETTMP := ${OBJSDIR}${REALNAME} +TARGET := ${WORKINGDIR}${REALNAME} DEPSBLDDIRS := ${DEPSDIR} $(addprefix ${DEPSDIR},${DIRS}) OBJSBLDDIRS := ${OBJSDIR} $(addprefix ${OBJSDIR},${DIRS}) @@ -70,7 +73,7 @@ install: # how to link the main target ${TARGETTMP}: ${OBJS} ${Q1}${PRNTFMT} "${CXX}" "$@" - ${Q2}${CXX} -shared ${CXXFLAGS} -o $@ $^ ${LIBS} + ${Q2}${CXX} ${CXXFLAGS} -shared -Wl,-soname,${SONAME} -o $@ $^ ${LIBS} # rule to copy tmp target to working directory ${TARGET}: ${TARGETTMP} | ${WORKINGDIR} @@ -116,17 +119,5 @@ clean: cleanobjs .PHONY: cleanall cleanall: clean cleanbin cleandeps -.PHONY: gitclean -gitclean: - ${Q1}${PRNTFMT} "git clean" "showing; use gitcleanf to force removal" - ${Q2}git clean -nxd - -.PHONY: gitcleanf -gitcleanf: - ${Q1}${PRNTFMT} "git clean" "forcing" - ${Q2}git clean -fxd - cd ${WORKINGDIR}; gprof -b ${TARGETNAME} > prof - cd ${WORKINGDIR}; kprof -f prof - -include ${DEPS}