summaryrefslogtreecommitdiff
path: root/lib/iniparser/Makefile
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-02-28 22:48:16 +0300
committerStefan Metzmacher <metze@samba.org>2010-03-03 09:22:39 +0100
commitb953c4c67cfc6f0de38526e97eb5fc6031d61c81 (patch)
treec7c51ff1673da8f87e65cfe11e0091bd7ed4638e /lib/iniparser/Makefile
parent1af5a6d35966ddb5435214a6d1f8ba34be697001 (diff)
downloadsamba-b953c4c67cfc6f0de38526e97eb5fc6031d61c81.tar.gz
samba-b953c4c67cfc6f0de38526e97eb5fc6031d61c81.tar.bz2
samba-b953c4c67cfc6f0de38526e97eb5fc6031d61c81.zip
s3: Move source3/iniparser to lib/iniparser to allow sharing between s3/s4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/iniparser/Makefile')
-rw-r--r--lib/iniparser/Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/iniparser/Makefile b/lib/iniparser/Makefile
new file mode 100644
index 0000000000..bc5d61211a
--- /dev/null
+++ b/lib/iniparser/Makefile
@@ -0,0 +1,63 @@
+#
+# iniparser Makefile
+#
+
+# Compiler settings
+CC = gcc
+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
+
+RM = rm -f
+
+
+# Implicit rules
+
+SUFFIXES = .o .c .h .a .so .sl
+
+COMPILE.c=$(CC) $(CFLAGS) -c
+.c.o:
+ @(echo "compiling $< ...")
+ @($(COMPILE.c) -o $@ $<)
+
+
+SRCS = src/iniparser.c \
+ src/dictionary.c \
+ src/strlib.c
+
+OBJS = $(SRCS:.c=.o)
+
+
+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 libiniparser.so*
+ rm -rf ./html ; mkdir html
+ cd test ; $(MAKE) veryclean
+
+docs:
+ @(cd doc ; $(MAKE))
+
+check:
+ @(cd test ; $(MAKE))