mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
correct cygwin detection (issue #5328)
handle parallel make better (issue #5328) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -160,6 +160,8 @@ ringtone.h: gentone
|
||||
|
||||
chan_oss.o: chan_oss.c busy.h ringtone.h
|
||||
|
||||
chan_alsa.o: chan_alsa.c busy.h ringtone.h
|
||||
|
||||
ifeq (${OSARCH},OpenBSD)
|
||||
chan_oss.so: chan_oss.o
|
||||
$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
|
||||
|
@@ -3,9 +3,8 @@
|
||||
#
|
||||
|
||||
OSTYPE=$(shell uname -s)
|
||||
cygx="$(shell uname -s | sed -e c\cygwin | tr [:upper:] [:lower:])"
|
||||
define cyg_subst_sys
|
||||
if [ $(cygx) = "cygwin" ]; then \
|
||||
if uname -s | grep -qi cygwin; then \
|
||||
cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \
|
||||
mv --force $@.copy $@; \
|
||||
fi
|
||||
@@ -230,3 +229,5 @@ editline.c : $(ACSRCS) $(BCSRCS) $(AGCSRCS)
|
||||
|
||||
.c.o_s : $(AGHDRS) $(BGHDRS)
|
||||
$(CC) -c $(S_CFLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@
|
||||
|
||||
$(CCSRCS) : $(BGHDRS)
|
||||
|
3
editline/configure
vendored
3
editline/configure
vendored
@@ -895,8 +895,7 @@ case "${host}" in
|
||||
ABI="elf"
|
||||
;;
|
||||
*-*-linux* | *cygwin*)
|
||||
cyg="$(echo ${host} | sed -e c\cygwin)"
|
||||
if [ ${cyg} = cygwin ]; then \
|
||||
if echo ${host} | grep -q cygwin ; then \
|
||||
echo "cygwin detected"; \
|
||||
S_CFLAGS=""; \
|
||||
echo "/* cygdef.h. Generated automatically by configure. */
|
||||
|
@@ -32,8 +32,7 @@ case "${host}" in
|
||||
ABI="elf"
|
||||
;;
|
||||
*-*-linux* | *cygwin*)
|
||||
cyg="$(echo ${host} | sed -e c\cygwin)"
|
||||
if [ ${cyg} = cygwin ]; then \
|
||||
if echo ${host} | grep -q cygwin ; then \
|
||||
echo "cygwin detected"; \
|
||||
S_CFLAGS=""; \
|
||||
echo "/* cygdef.h. Generated automatically by configure. */
|
||||
|
@@ -29,12 +29,12 @@ STANDALONE_FUNCS=$(filter-out $(BUILTINS),$(patsubst %.c,%.o,$(wildcard func*.c)
|
||||
|
||||
FUNCS+=$(STANDALONE_FUNCS:.o=.so)
|
||||
|
||||
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(BUILTINS:.o=.c) | awk '{print $$3};')
|
||||
FUNC_SOURCES=$(BUILTINS:.o=.c)
|
||||
|
||||
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(FUNC_SOURCES) | awk '{print $$3};')
|
||||
|
||||
CFLAGS+=-fPIC
|
||||
|
||||
FUNC_SOURCES=$(BUILTINS:.o=.c)
|
||||
|
||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||
endif
|
||||
@@ -49,13 +49,15 @@ clean:
|
||||
|
||||
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
|
||||
|
||||
pbx_functions.h: $(BUILTINS:.o=.c)
|
||||
pbx_functions.h: $(FUNC_SOURCES)
|
||||
@echo "/* Automatically generated - do not edit */" > $@
|
||||
@for f in $(FUNC_SOURCES); do echo "#include \"$$f\"" >> $@; done
|
||||
@echo "static struct ast_custom_function *builtins[] = {" >> $@
|
||||
@for f in $(FUNC_STRUCTS); do echo "&$$f," >> $@; done
|
||||
@echo "};" >> $@
|
||||
|
||||
pbx_functions.o: pbx_functions.h
|
||||
|
||||
pbx_functions.so: pbx_functions.o #$(BUILTINS)
|
||||
$(CC) $(SOLINK) -o $@ $<
|
||||
|
||||
|
Reference in New Issue
Block a user