1
0

Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. all : sample
  31. AXTLS_HOME=../..
  32. include $(AXTLS_HOME)/config/.config
  33. include $(AXTLS_HOME)/config/makefile.conf
  34. ifndef CONFIG_PLATFORM_WIN32
  35. ifdef CONFIG_PLATFORM_CYGWIN
  36. TARGET=$(AXTLS_HOME)/$(STAGE)/axssl.exe
  37. else
  38. TARGET=$(AXTLS_HOME)/$(STAGE)/axssl
  39. endif # cygwin
  40. LIBS=$(AXTLS_HOME)/$(STAGE)
  41. else
  42. TARGET=$(AXTLS_HOME)/$(STAGE)/axssl.exe
  43. endif
  44. ifndef CONFIG_C_SAMPLES
  45. sample:
  46. else
  47. sample : $(TARGET)
  48. OBJ= axssl.o
  49. include $(AXTLS_HOME)/config/makefile.post
  50. ifndef CONFIG_PLATFORM_WIN32
  51. $(TARGET): $(OBJ) $(LIBS)/libaxtls.a
  52. $(LD) $(LDFLAGS) -o $@ $(OBJ) -L$(LIBS) -laxtls
  53. ifdef CONFIG_STRIP_UNWANTED_SECTIONS
  54. $(STRIP) --remove-section=.comment $(TARGET)
  55. endif # use strip
  56. else # Win32
  57. $(TARGET): $(OBJ)
  58. $(LD) $(LDFLAGS) $(AXTLS_HOME)/config/axtls.res /out:$@ $^ /libpath:"$(AXTLS_HOME)/$(STAGE)" axtls.lib
  59. endif
  60. endif # CONFIG_C_SAMPLES
  61. clean::
  62. -@rm -f $(AXTLS_HOME)/$(STAGE)/axssl*