~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source3/iniparser/Makefile

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# iniparser Makefile
 
3
#
 
4
 
 
5
# Compiler settings
 
6
CC      = gcc
 
7
CFLAGS  = -O3 -fPIC
 
8
 
 
9
# Ar settings to build the library
 
10
AR          = ar
 
11
ARFLAGS = rcv
 
12
 
 
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
 
16
 
 
17
# Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
 
18
# RANLIB  = ranlib
 
19
RANLIB = true
 
20
 
 
21
RM      = rm -f
 
22
 
 
23
 
 
24
# Implicit rules
 
25
 
 
26
SUFFIXES = .o .c .h .a .so .sl
 
27
 
 
28
COMPILE.c=$(CC) $(CFLAGS) -c
 
29
.c.o:
 
30
        @(echo "compiling $< ...")
 
31
        @($(COMPILE.c) -o $@ $<)
 
32
 
 
33
 
 
34
SRCS = src/iniparser.c \
 
35
           src/dictionary.c \
 
36
           src/strlib.c
 
37
 
 
38
OBJS = $(SRCS:.c=.o)
 
39
 
 
40
 
 
41
default:        libiniparser.a libiniparser.so
 
42
 
 
43
libiniparser.a: $(OBJS)
 
44
        @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
 
45
        @($(RANLIB) libiniparser.a)
 
46
 
 
47
libiniparser.so:        $(OBJS)
 
48
        @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
 
49
                -Wl,-soname=`basename $@`.0
 
50
 
 
51
clean:
 
52
        $(RM) $(OBJS)
 
53
 
 
54
veryclean:
 
55
        $(RM) $(OBJS) libiniparser.a libiniparser.so*
 
56
        rm -rf ./html ; mkdir html
 
57
        cd test ; $(MAKE) veryclean
 
58
 
 
59
docs:
 
60
        @(cd doc ; $(MAKE))
 
61
        
 
62
check:
 
63
        @(cd test ; $(MAKE))