Annotation of embedaddon/axTLS/config/makefile.conf, 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: #
                     32: # A standard makefile for all makefiles
                     33: #
                     34: 
                     35: # All executables and libraries go here
                     36: STAGE=./_stage
                     37: 
                     38: ifneq ($(MAKECMDGOALS), clean)
                     39: 
                     40: # Give an initial rule
                     41: all: 
                     42: 
                     43: # Win32 
                     44: ifdef CONFIG_PLATFORM_WIN32
                     45: 
                     46: ifdef CONFIG_VISUAL_STUDIO_7_0
                     47: CONFIG_VISUAL_STUDIO_7_0_BASE_UNIX:=$(shell cygpath -u $(CONFIG_VISUAL_STUDIO_7_0_BASE))
                     48: export INCLUDE=$(shell echo "$(CONFIG_VISUAL_STUDIO_7_0_BASE)\vc7\include;$(CONFIG_VISUAL_STUDIO_7_0_BASE)\vc7\platformsdk\include")
                     49: export LIB=$(shell echo "$(CONFIG_VISUAL_STUDIO_7_0_BASE)\vc7\\platformsdk\lib;$(CONFIG_VISUAL_STUDIO_7_0_BASE)\vc7\lib")
                     50: PATH:=$(CONFIG_VISUAL_STUDIO_7_0_BASE_UNIX)/vc7/bin:$(CONFIG_VISUAL_STUDIO_7_0_BASE_UNIX)/common7/ide:$(PATH)
                     51: endif
                     52: ifdef CONFIG_VISUAL_STUDIO_8_0
                     53: CONFIG_VISUAL_STUDIO_8_0_BASE_UNIX:=$(shell cygpath -u $(CONFIG_VISUAL_STUDIO_8_0_BASE))
                     54: export INCLUDE=$(shell echo "$(CONFIG_VISUAL_STUDIO_8_0_BASE)\vc\include;$(CONFIG_VISUAL_STUDIO_8_0_BASE)\vc\platformsdk\include")
                     55: export LIB=$(shell echo "$(CONFIG_VISUAL_STUDIO_8_0_BASE)\vc\platformsdk\lib;$(CONFIG_VISUAL_STUDIO_8_0_BASE)\vc\lib")
                     56: PATH:=$(CONFIG_VISUAL_STUDIO_8_0_BASE_UNIX)/vc/bin:$(CONFIG_VISUAL_STUDIO_8_0_BASE_UNIX)/common7/ide:$(PATH)
                     57: endif
                     58: ifdef CONFIG_VISUAL_STUDIO_10_0
                     59: CONFIG_VISUAL_STUDIO_10_0_BASE_UNIX:=$(shell cygpath -u $(CONFIG_VISUAL_STUDIO_10_0_BASE))
                     60: export INCLUDE=$(shell echo "$(CONFIG_VISUAL_STUDIO_10_0_BASE)\vc\include;$(CONFIG_VISUAL_STUDIO_10_0_BASE)\..\Microsoft SDKs\Windows\v7.0A\include")
                     61: export LIB=$(shell echo "$(CONFIG_VISUAL_STUDIO_10_0_BASE)\vc\lib;$(CONFIG_VISUAL_STUDIO_10_0_BASE)\..\Microsoft SDKs\Windows\v7.0A\lib")
                     62: PATH:=$(CONFIG_VISUAL_STUDIO_10_0_BASE_UNIX)/vc/bin:$(CONFIG_VISUAL_STUDIO_10_0_BASE_UNIX)/common7/ide:$(PATH)
                     63: stuff:
                     64:        @echo $(INCLUDE)
                     65: endif
                     66: 
                     67: CC=cl.exe
                     68: LD=link.exe
                     69: AXTLS_INCLUDE=$(shell cygpath -w $(AXTLS_HOME))
                     70: CFLAGS+=/nologo /W3 /D"WIN32" /D"_MBCS" /D"_CONSOLE" /D"_CRT_SECURE_NO_DEPRECATE" /FD /I"$(AXTLS_INCLUDE)crypto" /I"$(AXTLS_INCLUDE)ssl" /I"$(AXTLS_INCLUDE)config" /c 
                     71: LDFLAGS=/nologo /subsystem:console /machine:I386
                     72: LDSHARED = /dll
                     73: AR=lib /nologo
                     74: 
                     75: ifdef CONFIG_DEBUG
                     76:        CFLAGS += /Gm /Zi /Od /D "_DEBUG"
                     77:        LDFLAGS += /debug /incremental:yes 
                     78: else
                     79:        CFLAGS += /O2 /D "NDEBUG"
                     80:        LDFLAGS += /incremental:no 
                     81: endif
                     82: 
                     83: else    # Not Win32
                     84: 
                     85: -include .depend
                     86: 
                     87: CFLAGS += -I$(AXTLS_HOME)/config -I$(AXTLS_HOME)/ssl -I$(AXTLS_HOME)/crypto
                     88: LD=$(CC)
                     89: STRIP=$(CROSS)strip
                     90: 
                     91: # Solaris
                     92: ifdef CONFIG_PLATFORM_SOLARIS
                     93: CFLAGS += -DCONFIG_PLATFORM_SOLARIS
                     94: LDFLAGS += -lsocket -lnsl -lc
                     95: LDSHARED = -G
                     96: # Linux/Cygwin
                     97: else 
                     98: CFLAGS += -Wall -Wstrict-prototypes -Wshadow
                     99: LDSHARED = -shared
                    100: 
                    101: # Linux
                    102: ifndef CONFIG_PLATFORM_CYGWIN
                    103: CFLAGS += -fPIC 
                    104: 
                    105: # Cygwin
                    106: else
                    107: CFLAGS += -DCONFIG_PLATFORM_CYGWIN
                    108: LDFLAGS += -enable-auto-import
                    109: endif
                    110: endif
                    111: 
                    112: ifdef CONFIG_DEBUG
                    113: CFLAGS += -g
                    114: else
                    115: LDFLAGS += -s
                    116: ifdef CONFIG_PLATFORM_SOLARIS
                    117: CFLAGS += -O 
                    118: else
                    119: CFLAGS += -O3
                    120: endif
                    121: 
                    122: endif  # CONFIG_DEBUG
                    123: endif   # WIN32
                    124: 
                    125: CFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_CFLAGS_OPTIONS)))
                    126: LDFLAGS+=$(subst ",, $(strip $(CONFIG_EXTRA_LDFLAGS_OPTIONS)))
                    127: 
                    128: endif   # not 'clean'
                    129: 
                    130: clean::
                    131:        -@rm -f *.o *.obj core* *.out *~ \.depend vc*0* 
                    132: 

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