gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/object.c gdbus/watch.c
-gatchat_sources = gatchat/gatchat.h gatchat/gatchat.c \
- gatchat/gatresult.h gatchat/gatresult.c \
- gatchat/gatsyntax.h gatchat/gatsyntax.c \
- gatchat/ringbuffer.h gatchat/ringbuffer.c
-
if DATAFILES
dbusdir = @DBUS_DATADIR@
sbin_PROGRAMS = src/connmand
-src_connmand_SOURCES = $(gdbus_sources) $(gatchat_sources) $(builtin_sources) \
+src_connmand_SOURCES = $(gdbus_sources) $(builtin_sources) \
src/main.c src/connman.h src/log.c src/selftest.c \
src/error.c src/plugin.c src/task.c src/element.c \
src/device.c src/network.c src/connection.c \
statedir = $(localstatedir)/run/connman
-storagedir = $(localstatedir)/lib/connman
-
plugindir = $(libdir)/connman/plugins
scriptdir = $(libdir)/connman/scripts
+storagedir = $(localstatedir)/lib/connman
+
+if MAINTAINER_MODE
+build_plugindir = $(abs_top_srcdir)/plugins/.libs
+build_scriptdir = $(abs_top_srcdir)/scripts
+else
+build_plugindir = $(plugindir)
+build_scriptdir = $(scriptdir)
+endif
+
AM_CFLAGS = @UDEV_CFLAGS@ @NETLINK_CFLAGS@ @DBUS_CFLAGS@ \
- @GLIB_CFLAGS@ @GTHREAD_CFLAGS@ $(builtin_cflags) \
- -DCONNMAN_PLUGIN_BUILTIN \
- -DSTATEDIR=\""$(statedir)"\" \
- -DPLUGINDIR=\""$(plugindir)"\" \
- -DSCRIPTDIR=\""$(scriptdir)"\" \
- -DSTORAGEDIR=\""$(storagedir)\""
+ @GLIB_CFLAGS@ @GTHREAD_CFLAGS@ $(builtin_cflags) \
+ -DCONNMAN_PLUGIN_BUILTIN \
+ -DSTATEDIR=\""$(statedir)"\" \
+ -DPLUGINDIR=\""$(build_plugindir)"\" \
+ -DSCRIPTDIR=\""$(build_scriptdir)"\" \
+ -DSTORAGEDIR=\""$(storagedir)\""
-INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/src \
- -I$(srcdir)/gdbus -I$(srcdir)/gatchat
+INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
src/connman.exp: $(src_connmand_OBJECTS)
- $(AM_V_GEN)nm -B $^ | awk '{ print $$3 }' | sort -u | grep -E -e '^connman_' > $@
+ $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
+ $(EGREP) -e '^connman_' -e '^g_dbus_' > $@
src/connman.ver: src/connman.exp
$(AM_V_at)echo "{ global:" > $@
- $(AM_V_GEN)cat $< | sed -e "s/\(.*\)/\1;/" >> $@
+ $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
$(AM_V_at)echo "local: *; };" >> $@
src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
$(src_connmand_OBJECTS) $(plugin_objects): $(local_headers)
include/connman/version.h: include/version.h
- $(AM_V_at)if [ ! -e include/connman ] ; then mkdir include/connman ; fi
+ $(AM_V_at)$(MKDIR_P) include/connman
$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
include/connman/%.h: include/%.h
- $(AM_V_at)if [ ! -e include/connman ] ; then mkdir include/connman ; fi
+ $(AM_V_at)$(MKDIR_P) include/connman
$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
clean-local: include/connman
- @rm -r $<
+ @$(RM) -r $<