plugindir = $(libdir)/connman/plugins
-plugin_LTLIBRARIES = ethernet.la bluetooth.la \
- ipv4.la udhcp.la dhclient.la \
- dnsproxy.la resolvconf.la resolvfile.la
+plugin_LTLIBRARIES = ipv4.la
if LOOPBACK
plugin_LTLIBRARIES += loopback.la
loopback_la_SOURCES = loopback.c
endif
+if ETHERNET
+plugin_LTLIBRARIES += ethernet.la
+
ethernet_la_SOURCES = ethernet.c inet.h inet.c
+endif
if WIFI
plugin_LTLIBRARIES += wifi.la
wifi_la_LIBADD = @GDBUS_LIBS@
endif
+if BLUETOOTH
+plugin_LTLIBRARIES += bluetooth.la
+
bluetooth_la_SOURCES = bluetooth.c inet.h inet.c
bluetooth_la_LIBADD = @GDBUS_LIBS@
+endif
if NOVATEL
plugin_LTLIBRARIES += novatel.la
ipv4_la_SOURCES = ipv4.c inet.h inet.c
+if UDHCP
+plugin_LTLIBRARIES += udhcp.la
+
udhcp_la_SOURCES = udhcp.c inet.h inet.c task.h task.c
udhcp_la_CFLAGS = @GLIB_CFLAGS@ @GDBUS_CFLAGS@ -DUDHCPC=\"@UDHCPC@\" \
-DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
+endif
+
+if DHCLIENT
+plugin_LTLIBRARIES += dhclient.la
dhclient_la_SOURCES = dhclient.c inet.h inet.c
dhclient_la_CFLAGS = @GLIB_CFLAGS@ @GDBUS_CFLAGS@ -DDHCLIENT=\"@DHCLIENT@\" \
-DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
+endif
if PPPD
plugin_LTLIBRARIES += pppd.la
pppd_la_SOURCES = pppd.c
+pppd_la_CFLAGS = @GLIB_CFLAGS@ -DPPPD=\"@PPPD@\"
endif
-dnsproxy_la_SOURCES = dnsproxy.c
+if RESOLVCONF
+plugin_LTLIBRARIES += resolvconf.la
resolvconf_la_SOURCES = resolvconf.c
resolvconf_la_CFLAGS = @GLIB_CFLAGS@ -DRESOLVCONF=\"@RESOLVCONF@\"
+endif
-resolvfile_la_SOURCES = resolvfile.c
+if DNSPROXY
+plugin_LTLIBRARIES += dnsproxy.la
+
+dnsproxy_la_SOURCES = dnsproxy.c
+endif
if POLKIT
plugin_LTLIBRARIES += polkit.la