2 # Copyright (c) 2007, Cameron Rich
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
9 # * Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # * Neither the name of the axTLS project nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24 # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 -include config
/.config
33 ifneq ($(strip $(HAVE_DOT_CONFIG
)),y
)
39 include config
/makefile.conf
41 target
: $(STAGE
) $(TARGET
)
43 # VERSION has to come from the command line
44 RELEASE
=axTLS-
$(VERSION
)
60 $(STAGE
) : ssl
/version.h
63 # create a version file with something in it.
65 @echo
"#define AXTLS_VERSION \"(no version)\"" > ssl
/version.h
68 @mkdir
-p
$(PREFIX
)/lib
69 @mkdir
-p
$(PREFIX
)/bin
72 $(MAKE
) -C config
/scripts
/config
clean
74 -@
rm config
/*.msi config
/*.back.aip config
/config.h config
/.config
*
77 @echo
"#define AXTLS_VERSION \"$(VERSION)\"" > ssl
/version.h
78 cd ..
/; tar cvfz
$(RELEASE
).
tar.gz
--wildcards-match-slash
--exclude .svn axTLS
; cd
-;
81 $(MAKE
) -C docsrc doco
83 # build the Win32 demo release version
85 @echo
"#define AXTLS_VERSION \"$(VERSION)\"" > ssl
/version.h
86 $(MAKE
) win32releaseconf
88 install: $(PREFIX
) all
89 cp
--no-dereference
$(STAGE
)/libax
* $(PREFIX
)/lib
90 chmod
755 $(PREFIX
)/lib
/libax
*
92 install -m
755 $(STAGE
)/ax
* $(PREFIX
)/bin
94 ifdef CONFIG_HTTP_HAS_AUTHORIZATION
95 install -m
755 $(STAGE
)/htpasswd
$(PREFIX
)/bin
97 ifdef CONFIG_PLATFORM_CYGWIN
98 install -m
755 $(STAGE
)/cygaxtls.dll
$(PREFIX
)/bin
100 ifdef CONFIG_PERL_BINDINGS
101 install -m
755 $(STAGE
)/axtlsp.pm
`perl -e 'use Config; print $$Config{installarchlib};'`
103 @mkdir
-p
-m
755 $(PREFIX
)/include/axTLS
104 install -m
644 crypto
/*.h
$(PREFIX
)/include/axTLS
105 install -m
644 ssl
/*.h
$(PREFIX
)/include/axTLS
106 -rm $(PREFIX
)/include/axTLS
/cert.h
107 -rm $(PREFIX
)/include/axTLS
/private_key.h
108 install -m
644 config
/config.h
$(PREFIX
)/include/axTLS
111 -@
rm $(PREFIX
)/lib
/libax
* > /dev
/null
2>&1
112 -@
rm $(PREFIX
)/bin
/ax
* > /dev
/null
2>&1
113 -@
rm $(PREFIX
)/bin
/axhttpd
* > /dev
/null
2>&1
114 -@
rm `perl -e 'use Config; print $$Config{installarchlib};'`/axtlsp.pm
> /dev
/null
2>&1
117 cd
$(STAGE
); ssltest
; ..
/ssl
/test/test_axssl.sh
; cd
-;
121 @cd crypto
; $(MAKE
) clean
122 @cd ssl
; $(MAKE
) clean
123 @cd httpd
; $(MAKE
) clean
124 @cd samples
; $(MAKE
) clean
125 @cd docsrc
; $(MAKE
) clean
126 @cd bindings
; $(MAKE
) clean
128 # ---------------------------------------------------------------------------
130 # ---------------------------------------------------------------------------
132 CONFIG_CONFIG_IN
= config
/Config.in
133 CONFIG_DEFCONFIG
= config
/defconfig
135 config
/scripts
/config
/conf
: config
/scripts
/config
/Makefile
136 $(MAKE
) -C config
/scripts
/config conf
137 -@if
[ ! -f config
/.config
] ; then \
138 cp
$(CONFIG_DEFCONFIG
) config
/.config
; \
141 config
/scripts
/config
/mconf
: config
/scripts
/config
/Makefile
142 $(MAKE
) -C config
/scripts
/config ncurses conf mconf
143 -@if
[ ! -f config
/.config
] ; then \
144 cp
$(CONFIG_DEFCONFIG
) .config
; \
148 $(MAKE
) -C config
/scripts
/config
clean
149 @
rm -f config
/.config
151 menuconfig
: config
/scripts
/config
/mconf
152 @.
/config
/scripts
/config
/mconf
$(CONFIG_CONFIG_IN
)
154 config
: config
/scripts
/config
/conf
155 @.
/config
/scripts
/config
/conf
$(CONFIG_CONFIG_IN
)
157 oldconfig
: config
/scripts
/config
/conf
158 @.
/config
/scripts
/config
/conf
-o
$(CONFIG_CONFIG_IN
)
160 default
: config
/scripts
/config
/conf
161 @.
/config
/scripts
/config
/conf
-d
$(CONFIG_CONFIG_IN
) > /dev
/null
164 randconfig
: config
/scripts
/config
/conf
165 @.
/config
/scripts
/config
/conf
-r
$(CONFIG_CONFIG_IN
)
167 allnoconfig
: config
/scripts
/config
/conf
168 @.
/config
/scripts
/config
/conf
-n
$(CONFIG_CONFIG_IN
)
170 allyesconfig
: config
/scripts
/config
/conf
171 @.
/config
/scripts
/config
/conf
-y
$(CONFIG_CONFIG_IN
)
173 # The special win32 release configuration
174 win32releaseconf
: config
/scripts
/config
/conf
175 @.
/config
/scripts
/config
/conf
-D config
/win32config
$(CONFIG_CONFIG_IN
) > /dev
/null
178 # The special linux release configuration
179 linuxconf
: config
/scripts
/config
/conf
180 @.
/config
/scripts
/config
/conf
-D config
/linuxconfig
$(CONFIG_CONFIG_IN
) > /dev
/null