2002-10-17 10:55:05 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# openssl
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
# TARGETS
|
|
|
|
OPENSSL_SITE:=http://www.openssl.org/source
|
2003-03-04 20:16:19 +01:00
|
|
|
OPENSSL_SOURCE:=openssl-0.9.7a.tar.gz
|
|
|
|
OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7a
|
2002-12-30 10:47:45 +01:00
|
|
|
OPENSSL_PATCH=$(SOURCE_DIR)/openssl.patch
|
2002-10-17 10:55:05 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(OPENSSL_SOURCE):
|
2002-11-21 00:16:10 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(OPENSSL_SITE)/$(OPENSSL_SOURCE)
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2002-12-30 10:47:45 +01:00
|
|
|
$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH)
|
2002-10-17 10:55:05 +02:00
|
|
|
gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
|
2002-12-30 10:47:45 +01:00
|
|
|
cat $(OPENSSL_PATCH) | patch -p1 -d $(OPENSSL_DIR)
|
2002-10-17 10:55:05 +02:00
|
|
|
touch $(OPENSSL_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
|
|
|
|
(cd $(OPENSSL_DIR); \
|
2003-01-30 16:52:12 +01:00
|
|
|
CFLAGS="-DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5" \
|
|
|
|
PATH=$(TARGET_PATH) ./Configure linux-$(ARCH) --prefix=/ \
|
|
|
|
--openssldir=/usr/lib/ssl -L$(STAGING_DIR)/lib -ldl \
|
2002-12-30 10:47:45 +01:00
|
|
|
-I$(STAGING_DIR)/include $(OPENSSL_OPTS) no-threads \
|
|
|
|
shared no-idea no-mdc2 no-rc5)
|
2002-10-17 10:55:05 +02:00
|
|
|
|
|
|
|
$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2003-03-04 21:16:15 +01:00
|
|
|
$(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
|
2003-01-30 16:52:12 +01:00
|
|
|
$(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install
|
2002-12-30 10:47:45 +01:00
|
|
|
cp -fa $(OPENSSL_DIR)/libcrypto.so* $(STAGING_DIR)/lib/
|
2003-02-12 09:10:40 +01:00
|
|
|
chmod a-x $(STAGING_DIR)/lib/libcrypto.so.0.9.7
|
2003-01-30 16:52:12 +01:00
|
|
|
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so)
|
|
|
|
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so.0)
|
2002-12-30 10:47:45 +01:00
|
|
|
cp -fa $(OPENSSL_DIR)/libssl.so* $(STAGING_DIR)/lib/
|
2003-02-12 09:10:40 +01:00
|
|
|
chmod a-x $(STAGING_DIR)/lib/libssl.so.0.9.7
|
2003-01-30 16:52:12 +01:00
|
|
|
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so)
|
|
|
|
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0)
|
2002-12-30 10:47:45 +01:00
|
|
|
|
2003-03-04 21:16:15 +01:00
|
|
|
$(TARGET_DIR)/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
|
2002-10-17 10:55:05 +02:00
|
|
|
cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/
|
|
|
|
cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/
|
2002-12-06 05:30:19 +01:00
|
|
|
#cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2003-03-04 21:16:15 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libssl.a: $(STAGING_DIR)/lib/libcrypto.so.0.9.7
|
2003-01-17 05:50:35 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/include
|
2003-01-08 19:17:28 +01:00
|
|
|
cp -a $(STAGING_DIR)/include/openssl $(TARGET_DIR)/usr/include/
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libssl.a $(TARGET_DIR)/usr/lib/
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libcrypto.a $(TARGET_DIR)/usr/lib/
|
2003-02-12 09:10:40 +01:00
|
|
|
rm -f $(TARGET_DIR)/lib/libcrypto.so
|
|
|
|
rm -f $(TARGET_DIR)/lib/libssl.so
|
|
|
|
(cd $(TARGET_DIR)/usr/lib; \
|
|
|
|
ln -fs /lib/libssl.so.0.9.7 libssl.so; \
|
|
|
|
ln -fs /lib/libcrypto.so.0.9.7 libcrypto.so; \
|
|
|
|
)
|
2003-03-13 21:30:07 +01:00
|
|
|
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libssl.so.0.9.7
|
|
|
|
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libcrypto.so.0.9.7
|
2003-01-20 20:24:02 +01:00
|
|
|
touch -c $(TARGET_DIR)/usr/lib/libssl.a
|
2003-01-08 19:17:28 +01:00
|
|
|
|
2003-01-21 08:34:29 +01:00
|
|
|
openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a
|
2003-01-08 19:17:28 +01:00
|
|
|
|
2002-10-17 10:55:05 +02:00
|
|
|
openssl-clean:
|
|
|
|
rm -f $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/openssl
|
|
|
|
rm -f $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/libcrypto.so*
|
|
|
|
rm -f $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/libssl.so*
|
|
|
|
$(MAKE) -C $(OPENSSL_DIR) clean
|
|
|
|
|
|
|
|
openssl-dirclean:
|
|
|
|
rm -rf $(OPENSSL_DIR)
|
|
|
|
|
2003-03-04 22:00:40 +01:00
|
|
|
openssl: uclibc $(TARGET_DIR)/lib/libcrypto.so.0.9.7
|
2002-10-17 10:55:05 +02:00
|
|
|
|