File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / axTLS / Makefile
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Fri Sep 28 11:55:55 2012 UTC (11 years, 8 months ago) by misho
Branches: v1_4_8, MAIN
CVS tags: datecs, HEAD
axTLS

    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: -include config/.config
   32: 
   33: ifneq ($(strip $(HAVE_DOT_CONFIG)),y)
   34: all: menuconfig
   35: else
   36: all: target
   37: endif
   38: 
   39: include config/makefile.conf
   40: 
   41: target : $(STAGE) $(TARGET)
   42: 
   43: # VERSION has to come from the command line
   44: RELEASE=axTLS-$(VERSION)
   45: 
   46: # standard version
   47: target:
   48: 	$(MAKE) -C crypto
   49: 	$(MAKE) -C ssl
   50: ifdef CONFIG_AXHTTPD
   51: 	$(MAKE) -C httpd
   52: endif
   53: ifdef CONFIG_AXTLSWRAP
   54: 	$(MAKE) -C axtlswrap
   55: endif
   56: ifdef CONFIG_BINDINGS
   57: 	$(MAKE) -C bindings
   58: endif
   59: ifdef CONFIG_SAMPLES
   60: 	$(MAKE) -C samples
   61: endif
   62: 
   63: $(STAGE) : ssl/version.h
   64: 	@mkdir -p $(STAGE)
   65: 
   66: # create a version file with something in it.
   67: ssl/version.h:
   68: 	@echo "#define AXTLS_VERSION    \"(no version)\"" > ssl/version.h
   69: 
   70: $(PREFIX) :
   71: 	@mkdir -p $(PREFIX)/lib
   72: 	@mkdir -p $(PREFIX)/bin
   73: 
   74: release:
   75: 	$(MAKE) -C config/scripts/config clean
   76: 	-$(MAKE) clean
   77: 	-@rm config/*.msi config/*.back.aip config/config.h config/.config*
   78: 	-@rm www/index.20*
   79: 	-@rm -fr $(STAGE)
   80: 	@echo "#define AXTLS_VERSION    \"$(VERSION)\"" > ssl/version.h
   81: 	cd ../; tar cvfz $(RELEASE).tar.gz --wildcards-match-slash --exclude .svn axTLS; cd -;
   82: 
   83: docs:
   84: 	$(MAKE) -C docsrc doco
   85: 
   86: # build the Win32 demo release version
   87: win32_demo:
   88: 	@echo "#define AXTLS_VERSION    \"$(VERSION)\"" > ssl/version.h
   89: 	$(MAKE) win32releaseconf
   90: 
   91: install: $(PREFIX) all
   92: 	cp $(STAGE)/libax* $(PREFIX)/lib
   93: 	chmod 755 $(PREFIX)/lib/libax* 
   94: ifdef CONFIG_SAMPLES
   95: 	install -m 755 $(STAGE)/ax* $(PREFIX)/bin 
   96: endif
   97: ifdef CONFIG_HTTP_HAS_AUTHORIZATION
   98: 	install -m 755 $(STAGE)/htpasswd $(PREFIX)/bin 
   99: endif
  100: ifdef CONFIG_PLATFORM_CYGWIN
  101: 	install -m 755 $(STAGE)/cygaxtls.dll $(PREFIX)/bin 
  102: endif
  103: ifdef CONFIG_PERL_BINDINGS 
  104: 	install -m 755 $(STAGE)/axtlsp.pm `perl -e 'use Config; print $$Config{installarchlib};'`
  105: endif
  106: 	@mkdir -p -m 755 $(PREFIX)/include/axTLS
  107: 	install -m 644 crypto/*.h $(PREFIX)/include/axTLS
  108: 	install -m 644 ssl/*.h $(PREFIX)/include/axTLS
  109: 	-rm $(PREFIX)/include/axTLS/cert.h
  110: 	-rm $(PREFIX)/include/axTLS/private_key.h
  111: 	-rm $(PREFIX)/include/axTLS/os_port.h
  112: 	install -m 644 config/config.h $(PREFIX)/include/axTLS
  113: 
  114: installclean:
  115: 	-@rm $(PREFIX)/lib/libax* > /dev/null 2>&1
  116: 	-@rm $(PREFIX)/bin/ax* > /dev/null 2>&1
  117: 	-@rm $(PREFIX)/bin/axhttpd* > /dev/null 2>&1
  118: 	-@rm `perl -e 'use Config; print $$Config{installarchlib};'`/axtlsp.pm > /dev/null 2>&1
  119: 
  120: test:
  121: 	cd $(STAGE); ssltest; ../ssl/test/test_axssl.sh; cd -;
  122: 
  123: # tidy up things
  124: clean::
  125: 	@cd crypto; $(MAKE) clean
  126: 	@cd ssl; $(MAKE) clean
  127: 	@cd httpd; $(MAKE) clean
  128: 	@cd axtlswrap; $(MAKE) clean
  129: 	@cd samples; $(MAKE) clean
  130: 	@cd docsrc; $(MAKE) clean
  131: 	@cd bindings; $(MAKE) clean
  132: 
  133: # ---------------------------------------------------------------------------
  134: # mconf stuff
  135: # ---------------------------------------------------------------------------
  136: 
  137: CONFIG_CONFIG_IN = config/Config.in
  138: CONFIG_DEFCONFIG = config/defconfig
  139: 
  140: config/scripts/config/conf: config/scripts/config/Makefile
  141: 	$(MAKE) -C config/scripts/config conf
  142: 	-@if [ ! -f config/.config ] ; then \
  143: 		cp $(CONFIG_DEFCONFIG) config/.config; \
  144: 	fi
  145: 
  146: config/scripts/config/mconf: config/scripts/config/Makefile
  147: 	$(MAKE) -C config/scripts/config ncurses conf mconf
  148: 	-@if [ ! -f config/.config ] ; then \
  149: 		cp $(CONFIG_DEFCONFIG) .config; \
  150: 	fi
  151: 
  152: cleanconf:
  153: 	$(MAKE) -C config/scripts/config clean
  154: 	@rm -f config/.config
  155: 
  156: menuconfig: config/scripts/config/mconf
  157: 	@./config/scripts/config/mconf $(CONFIG_CONFIG_IN)
  158: 
  159: config: config/scripts/config/conf
  160: 	@./config/scripts/config/conf $(CONFIG_CONFIG_IN)
  161: 
  162: oldconfig: config/scripts/config/conf
  163: 	@./config/scripts/config/conf -o $(CONFIG_CONFIG_IN)
  164: 
  165: default: config/scripts/config/conf
  166: 	@./config/scripts/config/conf -d $(CONFIG_CONFIG_IN) > /dev/null
  167: 	$(MAKE)
  168: 
  169: randconfig: config/scripts/config/conf
  170: 	@./config/scripts/config/conf -r $(CONFIG_CONFIG_IN)
  171: 
  172: allnoconfig: config/scripts/config/conf
  173: 	@./config/scripts/config/conf -n $(CONFIG_CONFIG_IN)
  174: 
  175: allyesconfig: config/scripts/config/conf
  176: 	@./config/scripts/config/conf -y $(CONFIG_CONFIG_IN)
  177: 
  178: # The special win32 release configuration
  179: win32releaseconf: config/scripts/config/conf
  180: 	@./config/scripts/config/conf -D config/win32config $(CONFIG_CONFIG_IN) > /dev/null
  181: 	$(MAKE)
  182: 
  183: # The special linux release configuration
  184: linuxconf: config/scripts/config/conf
  185: 	@./config/scripts/config/conf -D config/linuxconfig $(CONFIG_CONFIG_IN) > /dev/null
  186: 	$(MAKE)

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