From eb6016d84a1ebf6ec837d6cbabe1931f40e7232d Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Tue, 28 Apr 2009 17:40:13 -0400 Subject: [PATCH] changes to soname of lib --- Makefile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) 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} -- 2.10.2