DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
-TARGET = $(DIR_INFO)/$(THISAPP)
+
+ifeq "$(SSE2)" "1"
+ TARGET = $(DIR_INFO)/$(THISAPP)-sse2
+else
+ TARGET = $(DIR_INFO)/$(THISAPP)
+endif
+
+CFLAGS += -DPURIFY
+export RPM_OPT_FLAGS = $(CFLAGS)
+
+CONFIGURE_OPTIONS = \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ --enginesdir=/usr/lib/openssl/engines \
+ shared \
+ zlib-dynamic \
+ enable-camellia \
+ enable-md2 \
+ enable-seed \
+ enable-tlsext \
+ enable-rfc3779 \
+ no-idea \
+ no-mdc2 \
+ no-rc5 \
+ no-srp \
+ -DSSL_FORBID_ENULL
ifeq "$(MACHINE)" "i586"
- CONFIGURE_ARGS = linux-generic32 no-asm 386
+ CONFIGURE_OPTIONS += linux-elf
+
+ifneq "$(SSE2)" "1"
+ CONFIGURE_OPTIONS += no-sse2
+endif
endif
ifeq "$(MACHINE)" "armv5tel"
- CONFIGURE_ARGS = linux-generic32
+ CONFIGURE_OPIONS += linux-generic32
endif
-CFLAGS += -DPURIFY
-export RPM_OPT_FLAGS = $(CFLAGS)
-
###############################################################################
# Top-level Rules
###############################################################################
cd $(DIR_APP) && find crypto/ -name Makefile -exec \
sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
- cd $(DIR_APP) && ./Configure \
- --prefix=/usr \
- --openssldir=/etc/ssl \
- --enginesdir=/usr/lib/openssl/engines \
- shared \
- zlib-dynamic \
- enable-camellia \
- enable-md2 \
- enable-seed \
- enable-tlsext \
- enable-rfc3779 \
- no-idea \
- no-mdc2 \
- no-rc5 \
- no-srp \
- $(CONFIGURE_ARGS) \
- -DSSL_FORBID_ENULL
+ cd $(DIR_APP) && ./Configure $(CONFIGURE_OPTIONS)
cd $(DIR_APP) && make depend
cd $(DIR_APP) && make
+ifeq "$(SSE2)" "1"
+ -mkdir -pv /usr/lib/sse2
+ cd $(DIR_APP) && install -m 755 \
+ libcrypto.so.10 libssl.so.10 /usr/lib/sse2
+else
# Install everything.
cd $(DIR_APP) && make install
install -m 0644 $(DIR_SRC)/config/ssl/openssl.cnf /etc/ssl
-mkdir -pv /usr/lib/openssl
rm -vfr /usr/lib/openssl/engines
mv -v /usr/lib/engines /usr/lib/openssl
+endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)