diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-08-09 19:09:37 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-08-09 19:09:37 -0500 |
commit | 393d571e9362d4689153902a970d573965b93a0b (patch) | |
tree | 9b841a90d51162c63f580f7a5ca02c5c0fc56771 | |
parent | 26921a5523d6b3eb6cb15a0528c3aab189d8f8e3 (diff) | |
parent | 827457dca0c9073b93822db45c859c7ae83ece76 (diff) |
Merge "Produce friendly error when AST_MODULE_SELF_SYM is not defined."
-rw-r--r-- | codecs/lpc10/Makefile | 2 | ||||
-rw-r--r-- | include/asterisk.h | 4 | ||||
-rw-r--r-- | main/Makefile | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile index bdf1a3ad7..b414fd77d 100644 --- a/codecs/lpc10/Makefile +++ b/codecs/lpc10/Makefile @@ -25,7 +25,7 @@ CFLAGS+= -fPIC -Wno-comment # The code here generates lots of warnings, so compiling with -Werror # fails miserably. Remove it for the time being. -_ASTCFLAGS:=$(_ASTCFLAGS:-Werror=) +_ASTCFLAGS:=$(_ASTCFLAGS:-Werror=) -DAST_MODULE_SELF_SYM=__internal_codec_lpc10_self LIB = $(LIB_TARGET_DIR)/liblpc10.a diff --git a/include/asterisk.h b/include/asterisk.h index e509fbc39..93c7cfb28 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -286,6 +286,10 @@ struct ast_module; /* Internal/forward declaration, AST_MODULE_SELF should be used instead. */ struct ast_module *AST_MODULE_SELF_SYM(void); +#else + +#error "Externally compiled modules must declare AST_MODULE_SELF_SYM." + #endif /*! diff --git a/main/Makefile b/main/Makefile index 729ae9c01..663508a75 100644 --- a/main/Makefile +++ b/main/Makefile @@ -284,7 +284,7 @@ ifeq ($(GNU_LD),1) endif $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTLDFLAGS+=-Wl,-soname=$(ASTPJ_LIB) $(PJ_LDFLAGS) -$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskpj\" $(PJ_CFLAGS) +$(ASTPJ_LIB).$(ASTPJ_SO_VERSION): _ASTCFLAGS+=-fPIC -DAST_MODULE=\"asteriskpj\" -DAST_NOT_MODULE $(PJ_CFLAGS) $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): LIBS+=$(PJPROJECT_LDLIBS) -lssl -lcrypto -luuid -lm -lrt -lpthread ifeq ($(GNU_LD),1) $(ASTPJ_LIB).$(ASTPJ_SO_VERSION): SO_SUPPRESS_SYMBOLS=-Wl,--version-script,libasteriskpj.exports,--warn-common |