| 1 |
$FreeWRT$ |
| 2 |
|
| 3 |
* override optimisation to better suite embedded needs |
| 4 |
* our dlfcn.h lies somewhere else, and compat mode doesnt work |
| 5 |
* shared objects need full LDFLAGS |
| 6 |
* nobody will ever know why they always want libssl |
| 7 |
* libeditline is not build correctly |
| 8 |
|
| 9 |
not for upstream submission |
| 10 |
|
| 11 |
--- asterisk-1.2.14.orig/Makefile 2006-12-11 22:55:43.000000000 +0100 |
| 12 |
+++ asterisk-1.2.14/Makefile 2007-01-31 03:18:54.000000000 +0100 |
| 13 |
@@ -47,7 +47,7 @@ ifneq ($(findstring dont-optimize,$(MAKE |
| 14 |
#K6OPT = -DK6OPT |
| 15 |
|
| 16 |
#Tell gcc to optimize the code |
| 17 |
-OPTIMIZE+=-O6 |
| 18 |
+OPTIMIZE+=-Os |
| 19 |
endif |
| 20 |
|
| 21 |
#Overwite config files on "make samples" |
| 22 |
@@ -361,7 +361,7 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET) |
| 23 |
ASTCFLAGS+=-DPOLLCOMPAT |
| 24 |
endif |
| 25 |
|
| 26 |
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) |
| 27 |
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),) |
| 28 |
OBJS+= dlfcn.o |
| 29 |
ASTCFLAGS+=-DDLFCNCOMPAT |
| 30 |
endif |
| 31 |
@@ -387,7 +387,7 @@ ifeq ($(OSARCH),Darwin) |
| 32 |
else |
| 33 |
#These are used for all but Darwin |
| 34 |
ASTLINK=-Wl,-E |
| 35 |
- SOLINK=-shared -Xlinker -x |
| 36 |
+ SOLINK=-shared -Xlinker -x ${LDFLAGS} |
| 37 |
endif |
| 38 |
|
| 39 |
ifeq ($(OSARCH),FreeBSD) |
| 40 |
@@ -420,7 +420,9 @@ else |
| 41 |
HAVEDOT=no |
| 42 |
endif |
| 43 |
|
| 44 |
+ifneq (${NOCRYPTO},yes) |
| 45 |
LIBS+=-lssl |
| 46 |
+endif |
| 47 |
|
| 48 |
_all: all |
| 49 |
@echo " +--------- Asterisk Build Complete ---------+" |
| 50 |
@@ -444,10 +446,10 @@ endif |
| 51 |
noclean: depend asterisk subdirs |
| 52 |
|
| 53 |
editline/config.h: |
| 54 |
- cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \ |
| 55 |
+ cd editline && unset CFLAGS LIBS && CFLAGS="$(CFLAGS)" ./configure ; \ |
| 56 |
|
| 57 |
editline/libedit.a: FORCE |
| 58 |
- cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure |
| 59 |
+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(CFLAGS)" ./configure |
| 60 |
$(MAKE) -C editline libedit.a |
| 61 |
|
| 62 |
db1-ast/libdb1.a: FORCE |