3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 12:52:49 +01:00

make: plugin system for build

Preperation for ell plugins. New plugins can be added to
builtin_sources/builtin_modules, which will be added
to src/builtin.h when it is generated.
This commit is contained in:
James Prestwood 2017-11-22 14:34:35 -08:00 committed by Denis Kenzior
parent 016dcd52d8
commit 517df48101
3 changed files with 28 additions and 2 deletions

1
.gitignore vendored
View File

@ -44,3 +44,4 @@ unit/test-wsc
unit/test-eap-mschapv2
unit/test-eap-sim
test-suite.log
src/builtin.h

View File

@ -3,6 +3,9 @@ AM_MAKEFLAGS = --no-print-directory
ACLOCAL_AMFLAGS = -I build-aux
builtin_modules =
builtin_sources =
noinst_LTLIBRARIES = ell/libell-internal.la
dbusdir = @DBUS_CONFDIR@/dbus-1/system.d
@ -90,6 +93,8 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h \
src/iwd.h src/eap-sim.c src/eap-aka.c \
src/simutil.h src/simutil.c \
src/ap.h src/ap.c
$(builtin_sources)
src_iwd_LDADD = ell/libell-internal.la -ldl
dist_sysconf_DATA = src/iwd.conf
@ -246,7 +251,7 @@ if BUILD_DOCS
dist_man_MANS = $(manual_pages)
endif
EXTRA_DIST = $(manual_pages:.1=.txt)
EXTRA_DIST = src/genbuiltin $(manual_pages:.1=.txt)
AM_CFLAGS = -fvisibility=hidden
@ -254,7 +259,7 @@ MAINTAINERCLEANFILES = Makefile.in configure config.h.in aclocal.m4
DISTCLEANFILES = $(BUILT_SOURCES) $(unit_tests) $(manual_pages)
BUILT_SOURCES = ell/internal
BUILT_SOURCES = ell/internal src/builtin.h
ell/internal: Makefile
$(AM_V_at)$(MKDIR_P) ell
@ -283,3 +288,6 @@ ell/unit/test_data: Makefile
maintainer-clean-local:
-rm -rf build-aux ell
src/builtin.h: src/genbuiltin config.status
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@

17
src/genbuiltin Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
for i in $*
do
echo "extern struct l_plugin_desc __iwd_builtin_$i;"
done
echo
echo "static struct l_plugin_desc *__iwd_builtin[] = {"
for i in $*
do
echo " &__iwd_builtin_$i,"
done
echo " NULL"
echo "};"