Annotation of embedaddon/axTLS/ssl/Makefile, revision 1.1.1.1

1.1       misho       1: #
                      2: # Copyright (c) 2007, Cameron Rich
                      3: #
                      4: # All rights reserved.
                      5: #
                      6: # Redistribution and use in source and binary forms, with or without
                      7: # modification, are permitted provided that the following conditions are met:
                      8: #
                      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.
                     17: #
                     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.
                     29: #
                     30: 
                     31: AXTLS_HOME=..
                     32: 
                     33: include $(AXTLS_HOME)/config/.config
                     34: include $(AXTLS_HOME)/config/makefile.conf
                     35: 
                     36: all: libs
                     37: ifdef CONFIG_PERFORMANCE_TESTING
                     38:        $(MAKE) -C test
                     39: else
                     40: ifdef CONFIG_SSL_TEST
                     41:        $(MAKE) -C test
                     42: endif
                     43: endif
                     44: 
                     45: ifndef CONFIG_PLATFORM_WIN32
                     46: TARGET1=$(AXTLS_HOME)/$(STAGE)/libaxtls.a
                     47: BASETARGET=libaxtls.so
                     48: CRYPTO_PATH=$(AXTLS_HOME)/crypto/
                     49: ifdef CONFIG_PLATFORM_CYGWIN
                     50: TARGET2=$(AXTLS_HOME)/$(STAGE)/libaxtls.dll.a
                     51: else
                     52: TARGET2=$(AXTLS_HOME)/$(STAGE)/$(LIBMINOR)
                     53: endif
                     54: 
                     55: # shared library major/minor numbers
                     56: LIBMAJOR=$(BASETARGET).1
                     57: LIBMINOR=$(BASETARGET).1.2
                     58: else
                     59: TARGET1=$(AXTLS_HOME)/$(STAGE)/axtls.lib
                     60: TARGET2=$(AXTLS_HOME)/$(STAGE)/axtls.dll
                     61: STATIC_LIB=$(AXTLS_HOME)/$(STAGE)/axtls.static.lib
                     62: CRYPTO_PATH=$(AXTLS_HOME)\\crypto\\
                     63: endif
                     64: 
                     65: libs: $(TARGET1) $(TARGET2)
                     66: 
                     67: CRYPTO_OBJ=\
                     68:        $(CRYPTO_PATH)aes.o \
                     69:        $(CRYPTO_PATH)bigint.o \
                     70:        $(CRYPTO_PATH)crypto_misc.o \
                     71:        $(CRYPTO_PATH)hmac.o \
                     72:        $(CRYPTO_PATH)md2.o \
                     73:        $(CRYPTO_PATH)md5.o \
                     74:        $(CRYPTO_PATH)rc4.o \
                     75:        $(CRYPTO_PATH)rsa.o \
                     76:        $(CRYPTO_PATH)sha1.o
                     77: 
                     78: OBJ=\
                     79:        asn1.o \
                     80:        gen_cert.o \
                     81:        loader.o \
                     82:        openssl.o \
                     83:        os_port.o \
                     84:        p12.o \
                     85:        tls1.o \
                     86:        tls1_svr.o \
                     87:        tls1_clnt.o \
                     88:        x509.o
                     89: 
                     90: include $(AXTLS_HOME)/config/makefile.post
                     91: 
                     92: ifndef CONFIG_PLATFORM_WIN32     # Linux/Unix/Cygwin
                     93: 
                     94: $(TARGET1) : $(CRYPTO_OBJ) $(OBJ)
                     95:        $(AR) -r $@ $(CRYPTO_OBJ) $(OBJ)
                     96: 
                     97: $(TARGET2) : $(CRYPTO_OBJ) $(OBJ)
                     98: ifndef CONFIG_PLATFORM_CYGWIN
                     99:        $(LD) $(LDFLAGS) $(LDSHARED) -Wl,-soname,$(LIBMAJOR) -o $(AXTLS_HOME)/$(STAGE)/$(LIBMINOR) $(CRYPTO_OBJ) $(OBJ)
                    100:        cd $(AXTLS_HOME)/$(STAGE); ln -sf $(LIBMINOR) $(LIBMAJOR); ln -sf $(LIBMAJOR) $(BASETARGET); cd -
                    101: else
                    102:        $(LD) $(LDFLAGS) $(LDSHARED) -o $(AXTLS_HOME)/$(STAGE)/cygaxtls.dll \
                    103:     -Wl,--out-implib=$(AXTLS_HOME)/$(STAGE)/libaxtls.dll.a \
                    104:     -Wl,--export-all-symbols \
                    105:     -Wl,--enable-auto-import $(CRYPTO_OBJ) $(OBJ)
                    106: endif
                    107: 
                    108: else  # Win32
                    109: CRYPTO_OBJ:=$(CRYPTO_OBJ:.o=.obj)
                    110: 
                    111: $(TARGET1) : $(OBJ)
                    112:        $(AR) /out:$@ $(CRYPTO_OBJ) $(OBJ)
                    113: 
                    114: $(TARGET2) : $(OBJ)
                    115:        cp $(TARGET1) $(STATIC_LIB)
                    116:        $(LD) $(LDFLAGS) $(LDSHARED) /out:$@ $(CRYPTO_OBJ) $(OBJ)
                    117: 
                    118: endif    
                    119: 
                    120: clean::
                    121:        $(MAKE) -C test clean
                    122:        -@rm -f $(AXTLS_HOME)/$(STAGE)/* *.a $(TARGET1) $(TARGET2)
                    123: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>