aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-06 11:49:31 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-06 11:49:31 (GMT)
commit4bb1228e1ceb4af72997a5ff67401d55fa14257e (patch)
treea939a0503f8bff85708c0fc70ca9f53d16e63efa
parentf721aed4b1baef8ad9336c80f8835f3f3d504d68 (diff)
downloadhostap-4bb1228e1ceb4af72997a5ff67401d55fa14257e.zip
hostap-4bb1228e1ceb4af72997a5ff67401d55fa14257e.tar.gz
hostap-4bb1228e1ceb4af72997a5ff67401d55fa14257e.tar.bz2
Use thin archives to allow libraries to be merged
This allows libeap.a and libeap.so to be built by merging in multiple libraries from src subdirectories. In addition, this avoids wasting extra space and time for local builds.
-rw-r--r--eap_example/Makefile19
-rw-r--r--src/crypto/Makefile2
-rw-r--r--src/utils/Makefile2
3 files changed, 14 insertions, 9 deletions
diff --git a/eap_example/Makefile b/eap_example/Makefile
index 1784d40..ec26bc8 100644
--- a/eap_example/Makefile
+++ b/eap_example/Makefile
@@ -6,6 +6,10 @@ ifndef CC
CC=gcc
endif
+ifndef RANLIB
+RANLIB=ranlib
+endif
+
ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif
@@ -21,11 +25,7 @@ CFLAGS += -I../src
CFLAGS += -I../src/utils
-OBJS_both += ../src/utils/common.o
-OBJS_both += ../src/utils/os_unix.o
-OBJS_both += ../src/utils/wpa_debug.o
-OBJS_both += ../src/utils/base64.o
-OBJS_both += ../src/utils/wpabuf.o
+OBJS_both += ../src/utils/libutils.a
OBJS_both += ../src/crypto/sha1.o
OBJS_both += ../src/crypto/sha1-tlsprf.o
OBJS_both += ../src/crypto/aes-cbc.o
@@ -192,11 +192,16 @@ OBJS_lib=$(OBJS_both) $(OBJS_peer) $(OBJS_server)
OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o
+
+../src/utils/libutils.a:
+ $(MAKE) -C ../src/utils
+
+
ifneq ($(CONFIG_SOLIB), yes)
LIBEAP = libeap.a
libeap.a: $(OBJS_lib)
- ar rc libeap.a $(OBJS_lib)
- ranlib libeap.a
+ $(AR) crT libeap.a $(OBJS_lib)
+ $(RANLIB) libeap.a
else
CFLAGS += -fPIC -DPIC
diff --git a/src/crypto/Makefile b/src/crypto/Makefile
index c7ba82f..d1330a2 100644
--- a/src/crypto/Makefile
+++ b/src/crypto/Makefile
@@ -49,6 +49,6 @@ LIB_OBJS += fips_prf_internal.o
libcrypto.a: $(LIB_OBJS)
- $(AR) cr $@ $(LIB_OBJS)
+ $(AR) crT $@ $?
-include $(OBJS:%.o=%.d)
diff --git a/src/utils/Makefile b/src/utils/Makefile
index b4a8973..bf9e444 100644
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -28,6 +28,6 @@ LIB_OBJS += eloop.o
#LIB_OBJS += pcsc_funcs.o
libutils.a: $(LIB_OBJS)
- $(AR) cr $@ $(LIB_OBJS)
+ $(AR) crT $@ $?
-include $(OBJS:%.o=%.d)