mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +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:
@@ -158,7 +158,9 @@ busy.h: gentone
|
|||||||
ringtone.h: gentone
|
ringtone.h: gentone
|
||||||
./gentone ringtone 440 480
|
./gentone ringtone 440 480
|
||||||
|
|
||||||
chan_oss.o: chan_oss.c busy.h ringtone.h
|
chan_oss.o: chan_oss.c busy.h ringtone.h
|
||||||
|
|
||||||
|
chan_alsa.o: chan_alsa.c busy.h ringtone.h
|
||||||
|
|
||||||
ifeq (${OSARCH},OpenBSD)
|
ifeq (${OSARCH},OpenBSD)
|
||||||
chan_oss.so: chan_oss.o
|
chan_oss.so: chan_oss.o
|
||||||
|
@@ -3,9 +3,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
OSTYPE=$(shell uname -s)
|
OSTYPE=$(shell uname -s)
|
||||||
cygx="$(shell uname -s | sed -e c\cygwin | tr [:upper:] [:lower:])"
|
|
||||||
define cyg_subst_sys
|
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; \
|
cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \
|
||||||
mv --force $@.copy $@; \
|
mv --force $@.copy $@; \
|
||||||
fi
|
fi
|
||||||
@@ -230,3 +229,5 @@ editline.c : $(ACSRCS) $(BCSRCS) $(AGCSRCS)
|
|||||||
|
|
||||||
.c.o_s : $(AGHDRS) $(BGHDRS)
|
.c.o_s : $(AGHDRS) $(BGHDRS)
|
||||||
$(CC) -c $(S_CFLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@
|
$(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"
|
ABI="elf"
|
||||||
;;
|
;;
|
||||||
*-*-linux* | *cygwin*)
|
*-*-linux* | *cygwin*)
|
||||||
cyg="$(echo ${host} | sed -e c\cygwin)"
|
if echo ${host} | grep -q cygwin ; then \
|
||||||
if [ ${cyg} = cygwin ]; then \
|
|
||||||
echo "cygwin detected"; \
|
echo "cygwin detected"; \
|
||||||
S_CFLAGS=""; \
|
S_CFLAGS=""; \
|
||||||
echo "/* cygdef.h. Generated automatically by configure. */
|
echo "/* cygdef.h. Generated automatically by configure. */
|
||||||
|
@@ -32,8 +32,7 @@ case "${host}" in
|
|||||||
ABI="elf"
|
ABI="elf"
|
||||||
;;
|
;;
|
||||||
*-*-linux* | *cygwin*)
|
*-*-linux* | *cygwin*)
|
||||||
cyg="$(echo ${host} | sed -e c\cygwin)"
|
if echo ${host} | grep -q cygwin ; then \
|
||||||
if [ ${cyg} = cygwin ]; then \
|
|
||||||
echo "cygwin detected"; \
|
echo "cygwin detected"; \
|
||||||
S_CFLAGS=""; \
|
S_CFLAGS=""; \
|
||||||
echo "/* cygdef.h. Generated automatically by configure. */
|
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)
|
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
|
CFLAGS+=-fPIC
|
||||||
|
|
||||||
FUNC_SOURCES=$(BUILTINS:.o=.c)
|
|
||||||
|
|
||||||
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
ifeq ($(findstring BSD,${OSARCH}),BSD)
|
||||||
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
|
||||||
endif
|
endif
|
||||||
@@ -49,13 +49,15 @@ clean:
|
|||||||
|
|
||||||
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
|
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
|
||||||
|
|
||||||
pbx_functions.h: $(BUILTINS:.o=.c)
|
pbx_functions.h: $(FUNC_SOURCES)
|
||||||
@echo "/* Automatically generated - do not edit */" > $@
|
@echo "/* Automatically generated - do not edit */" > $@
|
||||||
@for f in $(FUNC_SOURCES); do echo "#include \"$$f\"" >> $@; done
|
@for f in $(FUNC_SOURCES); do echo "#include \"$$f\"" >> $@; done
|
||||||
@echo "static struct ast_custom_function *builtins[] = {" >> $@
|
@echo "static struct ast_custom_function *builtins[] = {" >> $@
|
||||||
@for f in $(FUNC_STRUCTS); do echo "&$$f," >> $@; done
|
@for f in $(FUNC_STRUCTS); do echo "&$$f," >> $@; done
|
||||||
@echo "};" >> $@
|
@echo "};" >> $@
|
||||||
|
|
||||||
|
pbx_functions.o: pbx_functions.h
|
||||||
|
|
||||||
pbx_functions.so: pbx_functions.o #$(BUILTINS)
|
pbx_functions.so: pbx_functions.o #$(BUILTINS)
|
||||||
$(CC) $(SOLINK) -o $@ $<
|
$(CC) $(SOLINK) -o $@ $<
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user