pdb: Fix array overrun by one.
[Samba.git] / lib / iniparser / Makefile
blobbc5d61211aebdf2096de711acb4950e2ec05033d
2 # iniparser Makefile
5 # Compiler settings
6 CC = gcc
7 CFLAGS = -O3 -fPIC
9 # Ar settings to build the library
10 AR = ar
11 ARFLAGS = rcv
13 SHLD = ${CC} ${CFLAGS}
14 LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
15 LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
17 # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
18 # RANLIB = ranlib
19 RANLIB = true
21 RM = rm -f
24 # Implicit rules
26 SUFFIXES = .o .c .h .a .so .sl
28 COMPILE.c=$(CC) $(CFLAGS) -c
29 .c.o:
30 @(echo "compiling $< ...")
31 @($(COMPILE.c) -o $@ $<)
34 SRCS = src/iniparser.c \
35 src/dictionary.c \
36 src/strlib.c
38 OBJS = $(SRCS:.c=.o)
41 default: libiniparser.a libiniparser.so
43 libiniparser.a: $(OBJS)
44 @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
45 @($(RANLIB) libiniparser.a)
47 libiniparser.so: $(OBJS)
48 @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
49 -Wl,-soname=`basename $@`.0
51 clean:
52 $(RM) $(OBJS)
54 veryclean:
55 $(RM) $(OBJS) libiniparser.a libiniparser.so*
56 rm -rf ./html ; mkdir html
57 cd test ; $(MAKE) veryclean
59 docs:
60 @(cd doc ; $(MAKE))
62 check:
63 @(cd test ; $(MAKE))