Hi,
I am trying to parse INI file !!! And using the INI parser given on the web by Nicholas Devillard's INI parser.
I tried running it on the server and did a Make and got the following error:
Code:
compiling src/iniparser.c ...
compiling src/dictionary.c ...
compiling src/strlib.c ...
r - iniparser.o
r - dictionary.o
r - strlib.o
ar: writing libiniparser.a
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file /usr/lib: unknown file type
ld: fatal: File processing errors. No output written to libiniparser.so.0
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libiniparser.so'
Here is my Makefile
Code:
#
# 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))
~
"Makefile" 63 lines, 1099 characters
PLZ help....