summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKibum Kim <kb0929.kim@samsung.com>2012-01-07 01:11:42 +0900
committerKibum Kim <kb0929.kim@samsung.com>2012-01-07 01:11:42 +0900
commit3993d7063abe2c3f69dfddb7e7b8337590dba7d9 (patch)
tree2c3f5dbee98ff5ec329849537b074c20dc84f5d2 /Makefile
parentc783c957e68721fb69729e25f28404994b1e0653 (diff)
downloadiniparser-3993d7063abe2c3f69dfddb7e7b8337590dba7d9.tar.gz
iniparser-3993d7063abe2c3f69dfddb7e7b8337590dba7d9.tar.bz2
iniparser-3993d7063abe2c3f69dfddb7e7b8337590dba7d9.zip
Git init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile63
1 files changed, 63 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bc5d612
--- /dev/null
+++ b/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))