mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +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:
@@ -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