Home | History | Annotate | Download | only in plugins
      1 
      2 plugindir = $(libdir)/bluetooth/plugins
      3 
      4 plugin_LTLIBRARIES =
      5 
      6 builtin_modules =
      7 builtin_sources =
      8 builtin_cflags =
      9 
     10 if SERVICEPLUGIN
     11 builtin_modules += service
     12 builtin_sources += service.c
     13 endif
     14 
     15 builtin_modules += hciops
     16 builtin_sources += hciops.c
     17 
     18 if NETLINK
     19 plugin_LTLIBRARIES += netlink.la
     20 netlink_la_LIBADD = @NETLINK_LIBS@
     21 endif
     22 
     23 builtin_modules += hal
     24 builtin_sources += hal.c
     25 
     26 builtin_modules += storage
     27 builtin_sources += storage.c
     28 
     29 noinst_LTLIBRARIES = libbuiltin.la echo.la
     30 
     31 libbuiltin_la_SOURCES = $(builtin_sources)
     32 libbuiltin_la_LDFLAGS =
     33 libbuiltin_la_CFLAGS = $(AM_CFLAGS) \
     34 			$(builtin_cflags) -DBLUETOOTH_PLUGIN_BUILTIN
     35 
     36 BUILT_SOURCES = builtin.h
     37 
     38 nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
     39 
     40 AM_LDFLAGS = -module -avoid-version -no-undefined
     41 
     42 AM_CFLAGS = -fvisibility=hidden @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ \
     43 			@GLIB_CFLAGS@ @GDBUS_CFLAGS@ @NETLINK_CFLAGS@
     44 
     45 INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src
     46 
     47 CLEANFILES = $(BUILT_SOURCES)
     48 
     49 MAINTAINERCLEANFILES = Makefile.in
     50 
     51 builtin.h:
     52 	echo "" > $@
     53 	list='$(builtin_modules)'; for i in $$list; \
     54 	  do echo "extern struct bluetooth_plugin_desc __bluetooth_builtin_$$i;" >> $@; done
     55 	echo "" >> $@
     56 	echo "static struct bluetooth_plugin_desc *__bluetooth_builtin[] = {" >> $@
     57 	list='$(builtin_modules)'; for i in $$list; \
     58 	  do echo "&__bluetooth_builtin_$$i," >> $@; done
     59 	echo "NULL };" >> $@
     60 
     61 all-local:
     62 	@$(LN_S) -f $(top_srcdir)/input/.libs/input.so
     63 	@$(LN_S) -f $(top_srcdir)/audio/.libs/audio.so
     64 	@$(LN_S) -f $(top_srcdir)/serial/.libs/serial.so
     65 	@$(LN_S) -f $(top_srcdir)/network/.libs/network.so
     66 
     67 clean-local:
     68 	@rm -f network.so
     69 	@rm -f serial.so
     70 	@rm -f audio.so
     71 	@rm -f input.so
     72