CC = @CC@
LN_S = @LN_S@
AR = @AR@
RANLIB = @RANLIB@
CPP = @CPP@
CFLAGS = @CFLAGS@ @DEFS@
CPPFLAGS = @CPPFLAGS@ @DEFS@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
SHOBJFLAGS = @SHOBJFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
SHOBJEXT = @SHOBJEXT@
ARFLAGS = # @ARFLAGS@
AREXT = @AREXT@
PKGVERS = @PACKAGE_VERSION@
PKGVERSMAJOR = `echo $(PKGVERS) | cut -f 1 -d .`
EXEEXT = @EXEEXT@
prefix = @prefix@
mandir = @mandir@
sysconfdir = @sysconfdir@
datadir = @datadir@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
srcdir = @srcdir@
LIBS = libconfig.$(AREXT) libconfig.$(SHOBJEXT)
BINS =
# The following two lines need to be kept syncronised.
OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o @LIBOBJS@
SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o @SHLIBOBJS@
all: $(LIBS) $(BINS)
libconfig.$(SHOBJEXT): $(SHOBJS)
$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $^ $(LDFLAGS)
libconfig.$(AREXT): $(OBJS)
$(AR) rcu $@ $^
-$(RANLIB) $@
libconfig.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h
libconfig_shr.o: $(srcdir)/libconfig.c $(srcdir)/compat.h $(srcdir)/win32.h $(srcdir)/config.h libconfig.h
%_shr.o: $(srcdir)/%.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ "$(filter %.c, $^)"
%.o: $(srcdir)/%.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ "$(filter %.c, $^)"
test-lc$(EXEEXT): $(LIBS) $(srcdir)/test-lc.c
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig
install: all libconfig.h
-$(INSTALL) -d "$(mandir)"
-$(INSTALL) -d "$(mandir)/man3"
-$(INSTALL) -d "$(libdir)"
-$(INSTALL) -d "$(includedir)"
-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).def "$(libdir)/libconfig.$(SHOBJEXT).def"
-$(INSTALL) -m 644 libconfig.$(SHOBJEXT).a "$(libdir)/libconfig.$(SHOBJEXT).a"
$(INSTALL) -m 755 libconfig.$(SHOBJEXT) "$(libdir)/libconfig.$(SHOBJEXT).$(PKGVERS)"
$(INSTALL) -m 644 libconfig.$(AREXT) "$(libdir)/libconfig.$(AREXT)"
$(INSTALL) -m 644 lc_register_callback.3 "$(mandir)/man3/lc_register_callback.3"
$(INSTALL) -m 644 lc_register_var.3 "$(mandir)/man3/lc_register_var.3"
$(INSTALL) -m 644 lc_process_file.3 "$(mandir)/man3/lc_process_file.3"
$(INSTALL) -m 644 lc_handle_type.3 "$(mandir)/man3/lc_handle_type.3"
$(INSTALL) -m 644 lc_geterrstr.3 "$(mandir)/man3/lc_geterrstr.3"
$(INSTALL) -m 644 lc_seterrstr.3 "$(mandir)/man3/lc_seterrstr.3"
$(INSTALL) -m 644 lc_geterrno.3 "$(mandir)/man3/lc_geterrno.3"
$(INSTALL) -m 644 lc_process.3 "$(mandir)/man3/lc_process.3"
$(INSTALL) -m 644 lc_cleanup.3 "$(mandir)/man3/lc_cleanup.3"
$(INSTALL) -m 644 libconfig.3 "$(mandir)/man3/libconfig.3"
$(INSTALL) -m 644 libconfig.h "$(includedir)/libconfig.h"
-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )
clean:
rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
distclean: clean
rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3
mrproper: distclean
rm -f aclocal.m4 config.guess config.sub install-sh configure
.PHONY: all clean distclean install