aboutsummaryrefslogtreecommitdiff
path: root/openssl/Makefile.in
blob: 6eaeaa1e5b282c3896cc0503086c7dd7dd466ae7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# $Id$

VERSION = 1.0.1j

OPENSSL_CONFIG_COMMAND  = @OPENSSL_CONFIG_COMMAND@
OPENSSL_BUILD_DIRECTORY = ${abs_builddir}/openssl
OPENSSL_SO_GLOB		= @OPENSSL_SO_GLOB@

abs_top_srcdir		= @abs_top_srcdir@
abs_top_builddir	= @abs_top_builddir@
prefix			= @prefix@
exec_prefix		= @exec_prefix@
libdir			= @libdir@

# We need to build with enable-shared whether we're really trying to
# build shared OpenSSL libraries or not, because _POW.so requires
# position independent code, so we need OpenSSL compiled with the
# options it would use for a shared library.  This then requires
# further gymnastics to get an openssl executable linked against the
# static libraries.  Fortunately, the top-level OpenSSL Makefile has
# generic target labels for the several stages of this build process,
# so we can just call them one at a time and tweak around the edges.

OPTIONS = enable-rfc3779 enable-cms no-dso shared --prefix=${prefix}

all: build_libs build_apps build_tests build_tools build_symlink

build_libs: openssl-${VERSION}/Makefile
	cd openssl-${VERSION}; ${MAKE} build_libs

build_apps: openssl-${VERSION}/apps/openssl

openssl-${VERSION}/apps/openssl: openssl-${VERSION}/libcrypto.a openssl-${VERSION}/libssl.a 
	cd openssl-${VERSION}; mkdir disabled
	cd openssl-${VERSION}; mv -fv ${OPENSSL_SO_GLOB} disabled
	cd openssl-${VERSION}; rm -f apps/openssl
	cd openssl-${VERSION}; ${MAKE} build_apps
	cd openssl-${VERSION}; mv -fv disabled/${OPENSSL_SO_GLOB} .
	cd openssl-${VERSION}; rmdir disabled

openssl-${VERSION}/libcrypto.a openssl-${VERSION}/libssl.a: build_libs

build_tests build_tools: openssl-${VERSION}/apps/openssl
	cd openssl-${VERSION}; ${MAKE} $@

build_symlink: openssl

openssl: openssl-${VERSION}/.
	ln -sf openssl-${VERSION} openssl

clean:
	rm -rf openssl-${VERSION} openssl
	cd tests; ${MAKE} $@

distclean: clean
	cd tests; ${MAKE} $@
	rm -f Makefile

openssl-${VERSION}/Makefile: openssl-${VERSION}/config
	cd openssl-${VERSION}; ${OPENSSL_CONFIG_COMMAND} ${OPTIONS}
	-cd openssl-${VERSION}; ${MAKE} depend

openssl-${VERSION}/config: openssl-${VERSION}.tar.gz
	gzip -c -d openssl-${VERSION}.tar.gz | tar -xf -
	ln -s . openssl-${VERSION}/lib
	touch $@

install:
	@echo Not attempting to install modified OpenSSL, if you want that, do it yourself

deinstall uninstall:
	@echo We never install our modified OpenSSL, so we do not deinstall it either

sandblast:
	svn st -v openssl* | awk '/^I/ && NF == 2 {system("set -x; rm -rf " $$2)}'

test: all
	cd tests; ${MAKE} $@