mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Move the last instance of AST_LIBS to the only place it is used,
namely main/Makefile . I am unclear where decisions on the build environment (CFLAGS, LDFLAGS, LIBS and so on) should be made - right now they are split here and there. As a first step in cleaning up this situation, i am trying to at least collect all instances of each variable in one place. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
Makefile
4
Makefile
@@ -15,7 +15,6 @@
|
|||||||
#
|
#
|
||||||
# ASTCFLAGS - compiler options
|
# ASTCFLAGS - compiler options
|
||||||
# ASTLDFLAGS - linker flags (not libraries)
|
# ASTLDFLAGS - linker flags (not libraries)
|
||||||
# AST_LIBS - libraries to build binaries XXX
|
|
||||||
# LIBS - additional libraries, at top-level for all links,
|
# LIBS - additional libraries, at top-level for all links,
|
||||||
# on a single object just for that object
|
# on a single object just for that object
|
||||||
# SOLINK - linker flags used only for creating shared objects (.so files),
|
# SOLINK - linker flags used only for creating shared objects (.so files),
|
||||||
@@ -229,7 +228,6 @@ ifeq ($(OSARCH),FreeBSD)
|
|||||||
# -V is understood by BSD Make, not by GNU make.
|
# -V is understood by BSD Make, not by GNU make.
|
||||||
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
|
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
|
||||||
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
|
||||||
AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),NetBSD)
|
ifeq ($(OSARCH),NetBSD)
|
||||||
@@ -348,7 +346,7 @@ main: $(filter-out main,$(MOD_SUBDIRS))
|
|||||||
|
|
||||||
$(MOD_SUBDIRS):
|
$(MOD_SUBDIRS):
|
||||||
@echo " [enter MOD_SUBDIR $@/]"
|
@echo " [enter MOD_SUBDIR $@/]"
|
||||||
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory --no-builtin-rules -C $@ SUBDIR=$@ all
|
||||||
@echo " [exit MOD_SUBDIR $@/]"
|
@echo " [exit MOD_SUBDIR $@/]"
|
||||||
|
|
||||||
$(OTHER_SUBDIRS):
|
$(OTHER_SUBDIRS):
|
||||||
|
@@ -85,6 +85,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSARCH),FreeBSD)
|
ifeq ($(OSARCH),FreeBSD)
|
||||||
|
# -V is understood by BSD Make, not by GNU make.
|
||||||
|
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
|
||||||
|
AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
|
||||||
AST_LIBS+=-lcrypto
|
AST_LIBS+=-lcrypto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user