$FreeWRT$ --- asterisk-1.2.15.orig/Makefile 2007-01-10 02:16:45.000000000 +0000 +++ asterisk-1.2.15/Makefile 2007-02-12 11:08:08.000000000 +0000 @@ -47,7 +47,7 @@ ifneq ($(findstring dont-optimize,$(MAKE #K6OPT = -DK6OPT #Tell gcc to optimize the code -OPTIMIZE+=-O6 +OPTIMIZE+=-Os endif #Overwite config files on "make samples" @@ -361,7 +361,7 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET) ASTCFLAGS+=-DPOLLCOMPAT endif -ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) +ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) OBJS+= dlfcn.o ASTCFLAGS+=-DDLFCNCOMPAT endif @@ -387,7 +387,7 @@ ifeq ($(OSARCH),Darwin) else #These are used for all but Darwin ASTLINK=-Wl,-E - SOLINK=-shared -Xlinker -x + SOLINK=-shared -Xlinker -x ${LDFLAGS} endif ifeq ($(OSARCH),FreeBSD) @@ -420,7 +420,9 @@ else HAVEDOT=no endif +ifneq (${NOCRYPTO},yes) LIBS+=-lssl +endif _all: all @echo " +--------- Asterisk Build Complete ---------+" @@ -444,10 +446,10 @@ endif noclean: depend asterisk subdirs editline/config.h: - cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \ + cd editline && unset CFLAGS LIBS && CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS)" ./configure ; \ editline/libedit.a: FORCE - cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure + cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS)" ./configure $(MAKE) -C editline libedit.a db1-ast/libdb1.a: FORCE @@ -530,7 +532,7 @@ asterisk: $(CYGLOADER) editline/libedit. fi rm -f include/asterisk/build.h.tmp $(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c - $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) + $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(EXTRA_LDFLAGS) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) muted: muted.o $(CC) $(AUDIO_LIBS) -o muted muted.o