aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-01 21:53:30 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-01 21:53:30 +0000
commit4d4023555b8c4e5812d2ac67242fe7754acc6def (patch)
tree17036a33b500972a312f1a5b2c75bee313f4b4d1 /funcs
parenta68250b79bf5358b7cf67bbd9185409a17993abc (diff)
issue #4678
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6936 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rwxr-xr-xfuncs/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/funcs/Makefile b/funcs/Makefile
index 7ec63b407..14bbd80a3 100755
--- a/funcs/Makefile
+++ b/funcs/Makefile
@@ -33,7 +33,12 @@ FUNC_SOURCES=$(BUILTINS:.o=.c)
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(FUNC_SOURCES) | awk '{print $$3};')
+ifeq (${OSARCH},CYGWIN)
+CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+CYGSOLIB=-L.. -L. -lasterisk.dll
+else
CFLAGS+=-fPIC
+endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
@@ -45,7 +50,7 @@ clean:
rm -f *.so *.o .depend pbx_functions.h
%.so : %.o
- $(CC) $(SOLINK) -o $@ $<
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
@@ -59,7 +64,7 @@ pbx_functions.h: $(FUNC_SOURCES)
pbx_functions.o: pbx_functions.h
pbx_functions.so: pbx_functions.o #$(BUILTINS)
- $(CC) $(SOLINK) -o $@ $<
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
install: all
for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done