diff options
Diffstat (limited to 'source3/iniparser/Makefile')
-rw-r--r-- | source3/iniparser/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/iniparser/Makefile b/source3/iniparser/Makefile index 59793dbee1..bc5d61211a 100644 --- a/source3/iniparser/Makefile +++ b/source3/iniparser/Makefile @@ -4,12 +4,16 @@ # Compiler settings CC = gcc -CFLAGS = -O3 +CFLAGS = -O3 -fPIC # Ar settings to build the library AR = ar ARFLAGS = rcv +SHLD = ${CC} ${CFLAGS} +LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib +LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib + # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX) # RANLIB = ranlib RANLIB = true @@ -34,17 +38,21 @@ SRCS = src/iniparser.c \ OBJS = $(SRCS:.c=.o) -default: libiniparser.a +default: libiniparser.a libiniparser.so libiniparser.a: $(OBJS) @($(AR) $(ARFLAGS) libiniparser.a $(OBJS)) @($(RANLIB) libiniparser.a) +libiniparser.so: $(OBJS) + @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \ + -Wl,-soname=`basename $@`.0 + clean: $(RM) $(OBJS) veryclean: - $(RM) $(OBJS) libiniparser.a + $(RM) $(OBJS) libiniparser.a libiniparser.so* rm -rf ./html ; mkdir html cd test ; $(MAKE) veryclean |