summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-03-24 08:43:05 -0400
committerCorey Farrell <git@cfware.com>2017-03-27 10:36:23 -0400
commit79a2c26c035bcd05250f2f09d6cc3cd65790535d (patch)
treedcd9df3d2532aa584c16025cabe42306047a599a
parent39fff2ebf9356eaceac6aa0c783a8616cc3b9491 (diff)
core: Remove embedded module support
This has not worked for some time and is no longer actively maintained. Change-Id: I5110b0db69c152761b58fa025cb0a53b0e544d99
-rw-r--r--Makefile39
-rw-r--r--Makefile.moddir_rules41
-rw-r--r--Makefile.rules12
-rw-r--r--UPGRADE.txt7
-rw-r--r--addons/Makefile7
-rw-r--r--apps/Makefile2
-rw-r--r--build_tools/cflags.xml4
-rw-r--r--build_tools/embed_modules.xml46
-rw-r--r--channels/Makefile12
-rw-r--r--codecs/Makefile10
-rwxr-xr-xconfigure58
-rw-r--r--configure.ac23
-rw-r--r--include/asterisk/module.h66
-rw-r--r--main/Makefile19
-rw-r--r--main/loader.c94
-rw-r--r--makeopts.in3
-rw-r--r--pbx/Makefile2
-rw-r--r--res/Makefile12
-rw-r--r--third-party/Makefile2
19 files changed, 53 insertions, 406 deletions
diff --git a/Makefile b/Makefile
index 0487abdd4..68c9776f3 100644
--- a/Makefile
+++ b/Makefile
@@ -254,9 +254,6 @@ SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
SUBDIRS_DIST_CLEAN:=$(SUBDIRS:%=%-dist-clean)
SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
-MOD_SUBDIRS_EMBED_LDSCRIPT:=$(MOD_SUBDIRS:%=%-embed-ldscript)
-MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
-MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
ifneq ($(findstring darwin,$(OSARCH)),)
@@ -345,41 +342,14 @@ ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
menuselect/menuselect --check-deps $@
endif
-$(MOD_SUBDIRS_EMBED_LDSCRIPT):
- +@echo "EMBED_LDSCRIPTS+="`$(SILENTMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
-
-$(MOD_SUBDIRS_EMBED_LDFLAGS):
- +@echo "EMBED_LDFLAGS+="`$(SILENTMAKE) -C $(@:-embed-ldflags=) SUBDIR=$(@:-embed-ldflags=) __embed_ldflags` >> makeopts.embed_rules
-
-$(MOD_SUBDIRS_EMBED_LIBS):
- +@echo "EMBED_LIBS+="`$(SILENTMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules
-
$(MOD_SUBDIRS_MENUSELECT_TREE):
+@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
+@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
-makeopts.embed_rules: menuselect.makeopts
- @echo "Generating embedded module rules ..."
- @rm -f $@
- +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT)
- +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS)
- +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS)
-
-$(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
+$(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
- ifeq ($(shell grep ^MENUSELECT_EMBED=$$ menuselect.makeopts 2>/dev/null),)
- # Non-windows:
- # ensure that all module subdirectories are processed before 'main' during
- # a parallel build, since if there are modules selected to be embedded the
- # directories containing them must be completed before the main Asterisk
- # binary can be built.
- # If MENUSELECT_EMBED is empty, we don't need this and allow 'main' to be
- # be built with only third_party first.
-main: $(filter-out main,$(MOD_SUBDIRS))
- else
main: third-party
- endif
else
# Windows: we need to build main (i.e. the asterisk dll) first,
# followed by res, followed by the other directories, because
@@ -444,7 +414,6 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
@$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
- rm -f makeopts.embed_rules
rm -f config.log config.status config.cache
rm -rf autom4te.cache
rm -f include/asterisk/autoconfig.h
@@ -1034,7 +1003,7 @@ menuselect/nmenuselect: menuselect/makeopts .lastclean
menuselect/makeopts: makeopts .lastclean
+$(MAKE_MENUSELECT) makeopts
-menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc) $(wildcard $(dir)/*.xml)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml utils/utils.xml agi/agi.xml configure makeopts
+menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc) $(wildcard $(dir)/*.xml)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml utils/utils.xml agi/agi.xml configure makeopts
@echo "Generating input for menuselect ..."
@echo "<?xml version=\"1.0\"?>" > $@
@echo >> $@
@@ -1047,7 +1016,6 @@ menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(di
fi
@cat utils/utils.xml >> $@
@cat agi/agi.xml >> $@
- @cat build_tools/embed_modules.xml >> $@
@cat sounds/sounds.xml >> $@
@echo "</menu>" >> $@
@@ -1098,9 +1066,6 @@ check-alembic: makeopts
.PHONY: $(SUBDIRS_CLEAN)
.PHONY: $(SUBDIRS_UNINSTALL)
.PHONY: $(SUBDIRS)
-.PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT)
-.PHONY: $(MOD_SUBDIRS_EMBED_LDFLAGS)
-.PHONY: $(MOD_SUBDIRS_EMBED_LIBS)
FORCE:
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 22849a2fa..4878cc992 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -18,10 +18,6 @@
# Also note that we can only set one variable per rule, so we have to
# repeat the left hand side to set multiple variables.
-ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
- _ASTCFLAGS+=${GC_CFLAGS}
-endif
-
ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
STATIC_BUILD=-static
endif
@@ -29,7 +25,7 @@ endif
include $(ASTTOPDIR)/Makefile.rules
# If MODULE_PREFIX is defined, use it to run the standard functions to set
-# C_MODS, CC_MODS, LOADABLE_MODS and EMBEDDED_MODS.
+# C_MODS, CC_MODS and LOADABLE_MODS
# Each word of MODULE_PREFIX is a prefix for filenames that we consider
# valid C or CC modules (eg. app, func ...). Note that the underscore
# is added here, and does not need to be in MODULE_PREFIX
@@ -46,11 +42,7 @@ endif
C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS))
CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS))
-ifneq ($(findstring EMBED_$(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),)
- EMBEDDED_MODS:=$(C_MODS) $(CC_MODS)
-else
- LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
-endif
+LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
# Both C++ and C++ sources need their module name in AST_MODULE
# We also pass whatever _INCLUDE list is generated by menuselect
@@ -74,16 +66,11 @@ endif
$(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
$(LOADABLE_MODS:%=%.so): _ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
-$(EMBEDDED_MODS:%=%.o): _ASTCFLAGS+=-DEMBEDDED_MODULE=$*
-
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
$(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
-modules.link: $(addsuffix .eo,$(filter $(EMBEDDED_MODS),$(C_MODS)))
-
.PHONY: clean uninstall _all moduleinfo makeopts
-ifneq ($(LOADABLE_MODS),)
_all: $(LOADABLE_MODS:%=%.so)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
# linker options and extra libraries for cygwin
@@ -91,28 +78,6 @@ ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+=-L$(ASTTOPDIR)/main -lasterisk -L$(ASTTOPDIR)/res $($@_LIBS)
# additional libraries in res/
endif
-endif
-
-ifneq ($(EMBEDDED_MODS),)
-_all: modules.link
-__embed_ldscript:
- @echo "../$(SUBDIR)/modules.link"
-__embed_ldflags:
- @echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
- @echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LDFLAGS))"
-__embed_libs:
- @echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(C_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
- @echo "$(foreach mod,$(filter $(EMBEDDED_MODS),$(CC_MODS)),$(foreach dep,$(MENUSELECT_DEPENDS_$(mod)),$(dep)_LIB))"
-else
-__embed_ldscript:
-__embed_ldflags:
-__embed_libs:
-endif
-
-modules.link:
- @rm -f $@
- @for file in $(patsubst %,$(SUBDIR)/%,$(filter %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
- @for file in $(patsubst %,$(SUBDIR)/%,$(filter-out %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
clean::
rm -f *.so *.o *.oo *.eo *.i *.ii
@@ -155,7 +120,7 @@ dist-clean::
echo "</member>" >> $@
.moduleinfo:: $(addsuffix .moduleinfo,$(addprefix .,$(sort $(ALL_C_MODS) $(ALL_CC_MODS)))) $(wildcard $(call tolower,$(MENUSELECT_CATEGORY)).xml)
- @echo "<category name=\"MENUSELECT_$(MENUSELECT_CATEGORY)\" displayname=\"$(MENUSELECT_DESCRIPTION)\" remove_on_change=\"$(SUBDIR)/modules.link\">" > $@
+ @echo "<category name=\"MENUSELECT_$(MENUSELECT_CATEGORY)\" displayname=\"$(MENUSELECT_DESCRIPTION)\">" > $@
@cat $^ >> $@
@echo "</category>" >> $@
diff --git a/Makefile.rules b/Makefile.rules
index 45989d684..ee8eabd6f 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -185,18 +185,6 @@ endif
$(ECHO_PREFIX) echo " [LDXX] $^ -> $@"
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
-%.eo: %.o
- $(ECHO_PREFIX) echo " [EMBED] $< -> $@"
- $(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_eo_script $* > .$@.ld
- $(CMD_PREFIX) $(LD) -r -T .$@.ld -o $@ $<
- $(CMD_PREFIX) rm -f .$@.ld
-
-%.eo: %.oo
- $(ECHO_PREFIX) echo " [EMBED] $< -> $@"
- $(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_eo_script $* > .$@.ld
- $(CMD_PREFIX) $(LD) -r -T .$@.ld -o $@ $<
- $(CMD_PREFIX) rm -f .$@.ld
-
%: %.o
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
diff --git a/UPGRADE.txt b/UPGRADE.txt
index 63a1885d5..d023f4088 100644
--- a/UPGRADE.txt
+++ b/UPGRADE.txt
@@ -21,6 +21,13 @@
=== UPGRADE-12.txt -- Upgrade info for 11 to 12
===========================================================
+From 13.15.0 to 13.16.0:
+
+Core:
+ - Support for embedded modules has been removed. This has not worked in
+ many years. LOADABLE_MODULES menuselect option is also removed as
+ loadable module support is now always enabled.
+
From 13.14.0 to 13.15.0:
res_rtp_asterisk:
diff --git a/addons/Makefile b/addons/Makefile
index 96438f5d0..ac4afb2a3 100644
--- a/addons/Makefile
+++ b/addons/Makefile
@@ -61,12 +61,11 @@ clean::
if [ -f mp3/Makefile ] ; then $(MAKE) -C mp3 clean ; fi
rm -f $(addprefix ooh323c/src/,$(H323OBJS))
-$(if $(filter format_mp3,$(EMBEDDED_MODS)),modules.link,format_mp3.so): mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
+format_mp3.so: mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o
chan_ooh323.o: _ASTCFLAGS+=$(H323CFLAGS)
-
-$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): _ASTCFLAGS+=$(H323CFLAGS)
-$(if $(filter chan_ooh323,$(EMBEDDED_MODS)),modules.link,chan_ooh323.so): $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o
+chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)
+chan_ooh323.so: $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o
$(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_ooh323)
.PHONY: check_mp3
diff --git a/apps/Makefile b/apps/Makefile
index 1e8be04d4..86e5caf5c 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -30,7 +30,7 @@ include $(ASTTOPDIR)/Makefile.moddir_rules
clean::
rm -f confbridge/*.o confbridge/*.i confbridge/*.gcda confbridge/*.gcno
-$(if $(filter app_confbridge,$(EMBEDDED_MODS)),modules.link,app_confbridge.so): $(subst .c,.o,$(wildcard confbridge/*.c))
+app_confbridge.so: $(subst .c,.o,$(wildcard confbridge/*.c))
$(subst .c,.o,$(wildcard confbridge/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,app_confbridge)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml
index d3c3ebe0a..b4be282b8 100644
--- a/build_tools/cflags.xml
+++ b/build_tools/cflags.xml
@@ -19,10 +19,6 @@
<member name="STATIC_BUILD" displayname="Build static binaries">
<support_level>extended</support_level>
</member>
- <member name="LOADABLE_MODULES" displayname="Runtime module loading">
- <defaultenabled>yes</defaultenabled>
- <support_level>core</support_level>
- </member>
<member name="DEBUG_FD_LEAKS" displayname="Enable File Descriptor Leak Detection">
<support_level>core</support_level>
</member>
diff --git a/build_tools/embed_modules.xml b/build_tools/embed_modules.xml
deleted file mode 100644
index a7e4cfd5d..000000000
--- a/build_tools/embed_modules.xml
+++ /dev/null
@@ -1,46 +0,0 @@
- <category name="MENUSELECT_EMBED" displayname="Module Embedding" positive_output="yes" remove_on_change="main/asterisk">
- <member name="EMBED_ADDONS" displayname="Add-ons" remove_on_change="addons/*.o addons/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_APPS" displayname="Applications" remove_on_change="apps/*.o apps/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_BRIDGES" displayname="Bridging Technologies" remove_on_change="bridges/*.o bridges/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_CDR" displayname="Call Detail Recording" remove_on_change="cdr/*.o cdr/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_CHANNELS" displayname="Channels" remove_on_change="channels/*.o channels/*/*.o channels/*.oo channels/*/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_CODECS" displayname="Coders/Decoders" remove_on_change="codecs/*.o codecs/*/*.o codecs/*/*/*.o codecs/*/*.a codecs/*/*/*.a codecs/*.oo codecs/*/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_FORMATS" displayname="File Formats" remove_on_change="formats/*.o formats/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_FUNCS" displayname="Dialplan Functions" remove_on_change="funcs/*.o funcs/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_PBX" displayname="PBX Functionality" remove_on_change="pbx/*.o pbx/*/*.o pbx/*.oo pbx/*/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_RES" displayname="Resource Modules" remove_on_change="res/*.o res/*/*.o res/*.oo res/*/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- <member name="EMBED_TEST" displayname="Test Modules" remove_on_change="tests/*.o tests/*.oo">
- <depend>gnu_ld</depend>
- <support_level>extended</support_level>
- </member>
- </category>
diff --git a/channels/Makefile b/channels/Makefile
index d1b895edd..cacfde190 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -30,13 +30,13 @@ clean::
rm -f iax2/*.o iax2/*.i iax2/*.gcda iax2/*.gcno
rm -f pjsip/*.o pjsip/*.i pjsip/*.gcda pjsip/*.gcno
-$(if $(filter chan_iax2,$(EMBEDDED_MODS)),modules.link,chan_iax2.so): $(subst .c,.o,$(wildcard iax2/*.c))
+chan_iax2.so: $(subst .c,.o,$(wildcard iax2/*.c))
$(subst .c,.o,$(wildcard iax2/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_iax2)
-$(if $(filter chan_sip,$(EMBEDDED_MODS)),modules.link,chan_sip.so): $(subst .c,.o,$(wildcard sip/*.c))
+chan_sip.so: $(subst .c,.o,$(wildcard sip/*.c))
$(subst .c,.o,$(wildcard sip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_sip)
-$(if $(filter chan_pjsip,$(EMBEDDED_MODS)),modules.link,chan_pjsip.so): $(subst .c,.o,$(wildcard pjsip/*.c))
+chan_pjsip.so: $(subst .c,.o,$(wildcard pjsip/*.c))
$(subst .c,.o,$(wildcard pjsip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_pjsip)
# Additional objects to combine with chan_dahdi.so
@@ -46,7 +46,7 @@ CHAN_DAHDI_OBJS= \
sig_pri.o \
sig_ss7.o \
-$(if $(filter chan_dahdi,$(EMBEDDED_MODS)),modules.link,chan_dahdi.so): $(CHAN_DAHDI_OBJS)
+chan_dahdi.so: $(CHAN_DAHDI_OBJS)
$(CHAN_DAHDI_OBJS): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_dahdi)
chan_misdn.o: _ASTCFLAGS+=-Imisdn
@@ -55,10 +55,10 @@ misdn_config.o: _ASTCFLAGS+=-Imisdn
misdn/isdn_lib.o: _ASTCFLAGS+=-Wno-strict-aliasing
-$(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
+chan_misdn.so: misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_misdn)
-$(if $(filter chan_oss,$(EMBEDDED_MODS)),modules.link,chan_oss.so): console_video.o vgrabbers.o console_board.o
+chan_oss.so: console_video.o vgrabbers.o console_board.o
console_video.o vgrabbers.o console_board.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_oss)
chan_usbradio.o: ./xpmr/xpmr.c ./xpmr/xpmr.h ./xpmr/xpmr_coef.h
diff --git a/codecs/Makefile b/codecs/Makefile
index 32230ae1b..c43f44bf0 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -38,7 +38,7 @@ include $(ASTTOPDIR)/Makefile.moddir_rules
ifneq ($(GSM_INTERNAL),no)
GSM_INCLUDE := -I$(SUB_GSM)/inc
-$(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): $(SUB_GSM)/lib/libgsm.a
+codec_gsm.so: $(SUB_GSM)/lib/libgsm.a
endif
# Don't run the implicit rules for this target.
@@ -59,7 +59,7 @@ clean::
.PHONY: $(SUB_DIRS)
-$(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
+codec_lpc10.so: $(LIBLPC10)
# Don't run the implicit rules for this target.
$(LIBLPC10): $(SUB_LPC10) ;
@@ -69,7 +69,7 @@ $(SUB_LPC10):
ifneq ($(ILBC_INTERNAL),no)
-$(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
+codec_ilbc.so: $(LIBILBC)
else
ILBC_INCLUDE += -DILBC_WEBRTC
endif
@@ -81,7 +81,7 @@ $(SUB_ILBC):
@$(MAKE) -C $(SUB_ILBC) all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
-$(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): g722/g722_encode.o g722/g722_decode.o
+codec_g722.so: g722/g722_encode.o g722/g722_decode.o
g722/g722_encode.o g722/g722_decode.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_g722)
@@ -92,6 +92,6 @@ else
SPEEX_RESAMPLE_CFLAGS:=
endif
-$(if $(filter codec_resample,$(EMBEDDED_MODS)),modules.link,codec_resample.so): speex/resample.o
+codec_resample.so: speex/resample.o
speex/resample.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,codec_resample) $(SPEEX_RESAMPLE_CFLAGS)
diff --git a/configure b/configure
index d603503e3..b0de4843a 100755
--- a/configure
+++ b/configure
@@ -704,8 +704,6 @@ AST_NO_STRICT_OVERFLOW
AST_FORTIFY_SOURCE
AST_TRAMPOLINES
AST_DECLARATION_AFTER_STATEMENT
-GC_LDFLAGS
-GC_CFLAGS
AST_UNDEFINED_SANITIZER
AST_LEAK_SANITIZER
AST_THREAD_SANITIZER
@@ -18732,62 +18730,6 @@ CFLAGS="${saved_sanitize_CFLAGS}"
LDFLAGS="${saved_sanitize_LDFLAGS}"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ffunction-sections support" >&5
-$as_echo_n "checking for -ffunction-sections support... " >&6; }
-saved_CFLAGS="${CFLAGS}"
-CFLAGS="${CFLAGS} -ffunction-sections"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-int x = 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- saved_LDFLAGS="${LDFLAGS}"
- LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --gc-sections support" >&5
-$as_echo_n "checking for --gc-sections support... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-int x = 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- GC_CFLAGS="-ffunction-sections"
- GC_LDFLAGS="-Wl,--gc-sections"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="${saved_LDFLAGS}"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="${saved_CFLAGS}"
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wdeclaration-after-statement support" >&5
$as_echo_n "checking for -Wdeclaration-after-statement support... " >&6; }
if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
diff --git a/configure.ac b/configure.ac
index 12f4a34dd..37449a1d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1195,29 +1195,6 @@ CFLAGS="${saved_sanitize_CFLAGS}"
LDFLAGS="${saved_sanitize_LDFLAGS}"
AC_SUBST(AST_UNDEFINED_SANITIZER)
-AC_MSG_CHECKING(for -ffunction-sections support)
-saved_CFLAGS="${CFLAGS}"
-CFLAGS="${CFLAGS} -ffunction-sections"
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [saved_LDFLAGS="${LDFLAGS}"]
- [LDFLAGS="${LDFLAGS} -Wl,--gc-sections"]
- AC_MSG_CHECKING(for --gc-sections support)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([], [int x = 1;])],
- AC_MSG_RESULT(yes)
- [GC_CFLAGS="-ffunction-sections"]
- [[GC_LDFLAGS="-Wl,--gc-sections"]],
- AC_MSG_RESULT(no)
- )
- [LDFLAGS="${saved_LDFLAGS}"],
- AC_MSG_RESULT(no)
-)
-CFLAGS="${saved_CFLAGS}"
-AC_SUBST(GC_CFLAGS)
-AC_SUBST(GC_LDFLAGS)
-
AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
AC_MSG_RESULT(yes)
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index b92043b84..27c521123 100644
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -303,8 +303,9 @@ struct ast_module_info {
enum ast_module_load_result (*load)(void); /*!< register stuff etc. Optional. */
int (*reload)(void); /*!< config etc. Optional. */
int (*unload)(void); /*!< unload. called with the module locked */
- int (*backup_globals)(void); /*!< for embedded modules, backup global data */
- void (*restore_globals)(void); /*!< for embedded modules, restore global data */
+ int (*backup_globals)(void); /*!< unused, left in place for ABI compat */
+ void (*restore_globals)(void); /*!< unused, left in place for ABI compat */
+
const char *name; /*!< name of the module for loader reference and CLI commands */
const char *description; /*!< user friendly description of the module. */
@@ -433,70 +434,9 @@ void __ast_module_unref(struct ast_module *mod, const char *file, int line, cons
and populated at the end of the module's source file... */
static const __attribute__((unused)) struct ast_module_info *ast_module_info;
-#if !defined(EMBEDDED_MODULE)
-#define __MODULE_INFO_SECTION
-#define __MODULE_INFO_GLOBALS
-#else
-/*
- * For embedded modules we need additional information to backup and
- * restore the global variables in the module itself, so we can unload
- * reload the module.
- * EMBEDDED_MODULE is defined as the module name, so the calls to make_var()
- * below will actually define different symbols for each module.
- */
-#define __MODULE_INFO_SECTION __attribute__((section(".embed_module")))
-#define __MODULE_INFO_GLOBALS .backup_globals = __backup_globals, .restore_globals = __restore_globals,
-
-#define make_var_sub(mod, type) __ ## mod ## _ ## type
-#define make_var(mod, type) make_var_sub(mod, type)
-
-extern void make_var(EMBEDDED_MODULE, bss_start);
-extern void make_var(EMBEDDED_MODULE, bss_end);
-extern void make_var(EMBEDDED_MODULE, data_start);
-extern void make_var(EMBEDDED_MODULE, data_end);
-
-static void * __attribute__((section(".embed_module"))) __global_backup;
-
-static int __backup_globals(void)
-{
- size_t data_size = & make_var(EMBEDDED_MODULE, data_end) - & make_var(EMBEDDED_MODULE, data_start);
-
- if (__global_backup)
- return 0;
-
- if (!data_size)
- return 0;
-
- if (!(__global_backup = ast_malloc(data_size)))
- return -1;
-
- memcpy(__global_backup, & make_var(EMBEDDED_MODULE, data_start), data_size);
-
- return 0;
-}
-
-static void __restore_globals(void)
-{
- size_t data_size = & make_var(EMBEDDED_MODULE, data_end) - & make_var(EMBEDDED_MODULE, data_start);
- size_t bss_size = & make_var(EMBEDDED_MODULE, bss_end) - & make_var(EMBEDDED_MODULE, bss_start);
-
- if (bss_size)
- memset(& make_var(EMBEDDED_MODULE, bss_start), 0, bss_size);
-
- if (!data_size || !__global_backup)
- return;
-
- memcpy(& make_var(EMBEDDED_MODULE, data_start), __global_backup, data_size);
-}
-#undef make_var
-#undef make_var_sub
-#endif /* EMBEDDED_MODULE */
-
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...) \
static struct ast_module_info \
- __MODULE_INFO_SECTION \
__mod_info = { \
- __MODULE_INFO_GLOBALS \
.name = AST_MODULE, \
.flags = flags_to_set, \
.description = desc, \
diff --git a/main/Makefile b/main/Makefile
index 599803a10..685d9e6c1 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps $(ASTTOPDIR)/makeopts.embed_rules $(ASTTOPDIR)/makeopts
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps $(ASTTOPDIR)/makeopts
all: asterisk
@@ -48,9 +48,7 @@ AST_LIBS+=$(RT_LIB)
AST_LIBS+=$(SYSTEMD_LIB)
ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
- ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
AST_LIBS+=-ldl
- endif
ifneq (x$(CAP_LIB),x)
AST_LIBS+=$(CAP_LIB)
endif
@@ -69,11 +67,7 @@ ifneq ($(findstring darwin,$(OSARCH)),)
ASTLINK+=/usr/lib/bundle1.o
else
# These are used for all but Darwin
- ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
- ASTLINK+=-Wl,--export-dynamic
- else
- ASTLINK+=${GC_LDFLAGS}
- endif
+ ASTLINK+=-Wl,--export-dynamic
ifneq ($(findstring BSD,$(OSARCH)),)
LDFLAGS+=-L/usr/local/lib
endif
@@ -172,9 +166,6 @@ endif
stdtime/localtime.o: _ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral
-AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
-AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
-AST_EMBED_LIBS:=$(foreach dep,$(EMBED_LIBS),$(value $(dep)))
OBJS:=$(sort $(OBJS))
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
@@ -325,10 +316,10 @@ endif
tcptls.o: _ASTCFLAGS+=$(OPENSSL_INCLUDE)
-$(MAIN_TGT): $(OBJS) $(ASTSSL_LIB) $(ASTPJ_LIB) $(LIBEDIT_OBJ) $(AST_EMBED_LDSCRIPTS)
+$(MAIN_TGT): $(OBJS) $(ASTSSL_LIB) $(ASTPJ_LIB) $(LIBEDIT_OBJ)
@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
- $(ECHO_PREFIX) echo " [LD] $(OBJS) $(LIBEDIT_OBJ) $(AST_EMBED_LDSCRIPTS) -> $@"
- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(OBJS) $(ASTSSL_LDLIBS) $(ASTPJ_LDLIBS) $(LIBEDIT_OBJ) $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS) $(LIBEDIT_LIB)
+ $(ECHO_PREFIX) echo " [LD] $(OBJS) $(LIBEDIT_OBJ) -> $@"
+ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(OBJS) $(ASTSSL_LDLIBS) $(ASTPJ_LDLIBS) $(LIBEDIT_OBJ) buildinfo.o $(AST_LIBS) $(GMIMELDFLAGS) $(LIBEDIT_LIB)
ifeq ($(GNU_LD),1)
$(MAIN_TGT): asterisk.exports
diff --git a/main/loader.c b/main/loader.c
index 74254b4fa..c135edc36 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -111,10 +111,6 @@ static const unsigned char expected_key[] =
static char buildopt_sum[33] = AST_BUILDOPT_SUM;
-static unsigned int embedding = 1; /* we always start out by registering embedded modules,
- since they are here before we dlopen() any
- */
-
/*!
* \brief Internal flag to indicate all modules have been initially loaded.
*/
@@ -150,14 +146,6 @@ const char *ast_module_name(const struct ast_module *mod)
return mod->info->name;
}
-/*
- * module_list is cleared by its constructor possibly after
- * we start accumulating embedded modules, so we need to
- * use another list (without the lock) to accumulate them.
- * Then we update the main list when embedding is done.
- */
-static struct module_list embedded_module_list;
-
struct loadupdate {
int (*updater)(void);
AST_LIST_ENTRY(loadupdate) entry;
@@ -186,15 +174,7 @@ static struct ast_module *resource_being_loaded;
void ast_module_register(const struct ast_module_info *info)
{
- struct ast_module *mod;
-
- if (embedding) {
- if (!(mod = ast_calloc(1, sizeof(*mod) + strlen(info->name) + 1)))
- return;
- strcpy(mod->resource, info->name);
- } else {
- mod = resource_being_loaded;
- }
+ struct ast_module *mod = resource_being_loaded;
ast_debug(5, "Registering module %s\n", info->name);
@@ -210,18 +190,14 @@ void ast_module_register(const struct ast_module_info *info)
might be unsafe to use the list lock at that point... so
let's avoid it altogether
*/
- if (embedding) {
- AST_DLLIST_INSERT_TAIL(&embedded_module_list, mod, entry);
- } else {
- AST_DLLIST_LOCK(&module_list);
- /* it is paramount that the new entry be placed at the tail of
- the list, otherwise the code that uses dlopen() to load
- dynamic modules won't be able to find out if the module it
- just opened was registered or failed to load
- */
- AST_DLLIST_INSERT_TAIL(&module_list, mod, entry);
- AST_DLLIST_UNLOCK(&module_list);
- }
+ AST_DLLIST_LOCK(&module_list);
+ /* it is paramount that the new entry be placed at the tail of
+ the list, otherwise the code that uses dlopen() to load
+ dynamic modules won't be able to find out if the module it
+ just opened was registered or failed to load
+ */
+ AST_DLLIST_INSERT_TAIL(&module_list, mod, entry);
+ AST_DLLIST_UNLOCK(&module_list);
/* give the module a copy of its own handle, for later use in registrations and the like */
*((struct ast_module **) &(info->self)) = mod;
@@ -437,8 +413,6 @@ static struct ast_module *find_resource(const char *resource, int do_lock)
return cur;
}
-#ifdef LOADABLE_MODULES
-
/*!
* \brief dlclose(), with failure logging.
*/
@@ -611,8 +585,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
return AST_DLLIST_LAST(&module_list);
}
-#endif
-
int modules_shutdown(void)
{
struct ast_module *mod;
@@ -729,18 +701,11 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f
AST_DLLIST_UNLOCK(&module_list);
- if (!error && !mod->lib && mod->info && mod->info->restore_globals)
- mod->info->restore_globals();
-
-#ifdef LOADABLE_MODULES
if (!error) {
unload_dynamic_module(mod);
ast_test_suite_event_notify("MODULE_UNLOAD", "Message: %s", resource_name);
- }
-#endif
-
- if (!error)
ast_update_use_count();
+ }
return res;
}
@@ -1080,7 +1045,6 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
if (global_symbols_only && !ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS))
return AST_MODULE_LOAD_SKIP;
} else {
-#ifdef LOADABLE_MODULES
mod = load_dynamic_module(resource_name, global_symbols_only, suppress_logging, resource_heap);
if (mod == MODULE_LOCAL_ONLY) {
return AST_MODULE_LOAD_SKIP;
@@ -1091,22 +1055,11 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
}
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}
-#else
- ast_log(LOG_WARNING, "Module support is not available. Module '%s' could not be loaded.\n", resource_name);
- return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
-#endif
}
if (inspect_module(mod)) {
ast_log(LOG_WARNING, "Module '%s' could not be loaded.\n", resource_name);
-#ifdef LOADABLE_MODULES
unload_dynamic_module(mod);
-#endif
- return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
- }
-
- if (!mod->lib && mod->info->backup_globals && mod->info->backup_globals()) {
- ast_log(LOG_WARNING, "Module '%s' was unable to backup its global data.\n", resource_name);
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}
@@ -1324,7 +1277,6 @@ done:
int load_modules(unsigned int preload_only)
{
struct ast_config *cfg;
- struct ast_module *mod;
struct load_order_entry *order;
struct ast_variable *v;
unsigned int load_count;
@@ -1332,14 +1284,8 @@ int load_modules(unsigned int preload_only)
int res = 0;
struct ast_flags config_flags = { 0 };
int modulecount = 0;
-
-#ifdef LOADABLE_MODULES
struct dirent *dirent;
DIR *dir;
-#endif
-
- /* all embedded modules have registered themselves by now */
- embedding = 0;
ast_verb(1, "Asterisk Dynamic Loader Starting:\n");
@@ -1347,12 +1293,6 @@ int load_modules(unsigned int preload_only)
AST_DLLIST_LOCK(&module_list);
- if (embedded_module_list.first) {
- module_list.first = embedded_module_list.first;
- module_list.last = embedded_module_list.last;
- embedded_module_list.first = NULL;
- }
-
cfg = ast_config_load2(AST_MODULE_CONFIG, "" /* core, can't reload */, config_flags);
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_WARNING, "No '%s' found, no modules will be loaded.\n", AST_MODULE_CONFIG);
@@ -1374,19 +1314,6 @@ int load_modules(unsigned int preload_only)
/* check if 'autoload' is on */
if (!preload_only && ast_true(ast_variable_retrieve(cfg, "modules", "autoload"))) {
- /* if so, first add all the embedded modules that are not already running to the load order */
- AST_DLLIST_TRAVERSE(&module_list, mod, entry) {
- /* if it's not embedded, skip it */
- if (mod->lib)
- continue;
-
- if (mod->flags.running)
- continue;
-
- add_to_load_order(mod->resource, &load_order, 0);
- }
-
-#ifdef LOADABLE_MODULES
/* if we are allowed to load dynamic modules, scan the directory for
for all available modules and add them as well */
if ((dir = opendir(ast_config_AST_MODULE_DIR))) {
@@ -1415,7 +1342,6 @@ int load_modules(unsigned int preload_only)
ast_log(LOG_WARNING, "Unable to open modules directory '%s'.\n",
ast_config_AST_MODULE_DIR);
}
-#endif
}
/* now scan the config for any modules we are prohibited from loading and
diff --git a/makeopts.in b/makeopts.in
index dd04fed32..56bf11ef7 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -62,9 +62,6 @@ HOST_OS=@HOST_OS@
OSARCH=@OSARCH@
OSREV=@PBX_OSREV@
-GC_CFLAGS=@GC_CFLAGS@
-GC_LDFLAGS=@GC_LDFLAGS@
-
PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
PTHREAD_LIBS=@PTHREAD_LIBS@
diff --git a/pbx/Makefile b/pbx/Makefile
index a031cdfa5..d1a401463 100644
--- a/pbx/Makefile
+++ b/pbx/Makefile
@@ -31,5 +31,5 @@ dundi-parser.o: _ASTCFLAGS+=-I.
pbx_gtkconsole.o: _ASTCFLAGS+=-Wno-strict-prototypes
-$(if $(filter pbx_dundi,$(EMBEDDED_MODS)),modules.link,pbx_dundi.so): dundi-parser.o
+pbx_dundi.so: dundi-parser.o
dundi-parser.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,pbx_dundi)
diff --git a/res/Makefile b/res/Makefile
index d5e0e37a3..2b688edc4 100644
--- a/res/Makefile
+++ b/res/Makefile
@@ -37,19 +37,19 @@ ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
_ASTCFLAGS+=-Wno-parentheses-equality
endif
-$(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
+res_ais.so: ais/clm.o ais/evt.o
ais/clm.o ais/evt.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ais)
-$(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o
+res_snmp.so: snmp/agent.o
snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
-$(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
+res_ael_share.so: ael/ael_lex.o ael/ael.tab.o ael/pval.o
ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
-$(if $(filter res_pjsip,$(EMBEDDED_MODS)),modules.link,res_pjsip.so): $(subst .c,.o,$(wildcard res_pjsip/*.c))
+res_pjsip.so: $(subst .c,.o,$(wildcard res_pjsip/*.c))
$(subst .c,.o,$(wildcard res_pjsip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_pjsip)
-$(if $(filter res_stasis,$(EMBEDDED_MODS)),modules.link,res_stasis.so): $(subst .c,.o,$(wildcard stasis/*.c))
+res_stasis.so: $(subst .c,.o,$(wildcard stasis/*.c))
$(subst .c,.o,$(wildcard stasis/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis)
ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
@@ -83,7 +83,7 @@ clean::
rm -f stasis_recording/*.[oi] stasis_recording/*.gcda stasis_recording/*.gcno
rm -f ari/*.[oi] ari/*.gcda ari/*.gcno
-$(if $(filter res_parking,$(EMBEDDED_MODS)),modules.link,res_parking.so): $(subst .c,.o,$(wildcard parking/*.c))
+res_parking.so: $(subst .c,.o,$(wildcard parking/*.c))
$(subst .c,.o,$(wildcard parking/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_parking)
res_ari.so: ari/cli.o ari/config.o ari/ari_websockets.o
diff --git a/third-party/Makefile b/third-party/Makefile
index f3016f153..59b7c0649 100644
--- a/third-party/Makefile
+++ b/third-party/Makefile
@@ -6,7 +6,7 @@ TP_SUBDIRS := pjproject
# to prevent accidentally running the package's default install target.
TP_INSTALL_SUBDIRS := pjproject
-.PHONY: all dist-clean distclean install clean moduleinfo makeopts uninstall __embed_libs __embed_ldscript __embed_ldflags $(TP_SUBDIRS)
+.PHONY: all dist-clean distclean install clean moduleinfo makeopts uninstall $(TP_SUBDIRS)
override MAKECMDGOALS?=all