Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Copyright (C) 2008 by egnite GmbH
  3. # Copyright (C) 2001-2006 by egnite Software GmbH
  4. #
  5. # All rights reserved.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. #
  11. # 1. Redistributions of source code must retain the above copyright
  12. # notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. # notice, this list of conditions and the following disclaimer in the
  15. # documentation and/or other materials provided with the distribution.
  16. # 3. Neither the name of the copyright holders nor the names of
  17. # contributors may be used to endorse or promote products derived
  18. # from this software without specific prior written permission.
  19. #
  20. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  23. # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  24. # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  25. # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  26. # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  27. # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  28. # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  29. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  30. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. # SUCH DAMAGE.
  32. #
  33. # For additional information see http://www.ethernut.de/
  34. #
  35. PROJ = libnutdev
  36. top_srcdir = ..
  37. top_blddir = ..
  38. LIBDIR = $(top_blddir)/lib
  39. include $(top_srcdir)/NutConf.mk
  40. include $(top_srcdir)/Makedefs
  41. SRCS = ihndlr.c can_dev.c usart.c null.c chat.c term.c netbuf.c ppp.c nvmem.c \
  42. twbbif.c mmcard.c x12rtc.c cy2239x.c npl.c nplmmc.c watchdog.c \
  43. rtc.c ds1307rtc.c at49bv.c avrtarget.c sbbif0.c pcf8563.c \
  44. pca9555.c usart0sc16is752.c usartsc16is752.c spi_7seg.c led.c keys.c \
  45. at25df.c
  46. ifeq ($(DEVICE), SAM3U)
  47. SRCS+= usb/CDCDSerialDriver.c \
  48. usb/CDCDSerialDriverDescriptors.c \
  49. usb/CDCLineCoding.c \
  50. usb/CDCSetControlLineStateRequest.c \
  51. usb/USBConfigurationDescriptor.c \
  52. usb/USBDCallbacks_Initialized.c \
  53. usb/USBDCallbacks_Reset.c \
  54. usb/USBDDriver.c \
  55. usb/USBDDriverCb_CfgChanged.c \
  56. usb/USBDDriverCb_IfSettingChanged.c \
  57. usb/USBD_UDPHS.c \
  58. usb/USBEndpointDescriptor.c \
  59. usb/USBFeatureRequest.c \
  60. usb/USBGenericDescriptor.c \
  61. usb/USBGenericRequest.c \
  62. usb/USBGetDescriptorRequest.c \
  63. usb/USBInterfaceRequest.c \
  64. usb/USBSetAddressRequest.c \
  65. usb/USBSetConfigurationRequest.c
  66. endif
  67. ifeq ($(DEVICE), STM32F10X)
  68. SRCS += ber_fpga_api.c ber_fpga_upload.c #liu.c
  69. endif
  70. ifeq ($(DEVICE), AT91R40008)
  71. SRCS += npluled.c sbimmc.c
  72. endif
  73. ifeq ($(DEVICE), AT91SAM7X256)
  74. SRCS += at45db.c
  75. endif
  76. ifeq ($(DEVICE), AT91SAM9260)
  77. SRCS += at45db.c
  78. endif
  79. OBJS = $(SRCS:.c=.o)
  80. TARG = $(PROJ).a
  81. all: $(TARG)
  82. include $(top_srcdir)/Makerules
  83. $(TARG): $(OBJS)
  84. $(AR) $(ARFLAGS) $(TARG) $(OBJS)
  85. install: $(TARG)
  86. $(CP) $(TARG) $(LIBDIR)/$(TARG)
  87. ifeq ($(ARCH), unix)
  88. $(RANLIB) $(LIBDIR)/$(TARG)
  89. endif
  90. clean:
  91. @echo " [CLEANING] $(TARG)..."
  92. @-rm -f $(OBJS)
  93. @-rm -f $(TARG)
  94. @-rm -f $(SRCS:.c=.lst)
  95. @-rm -f $(SRCS:.c=.lis)
  96. @-rm -f $(SRCS:.c=.s)
  97. @-rm -f $(SRCS:.c=.bak)
  98. @-rm -f $(SRCS:.c=.c~)
  99. @-rm -f $(SRCS:.c=.i)