1# Copyright (c) 2004, Theodore A. Roth 2# Copyright (c) 2005, 2008, 2009 Anatoly Sokolov 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are met: 7# 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in 12# the documentation and/or other materials provided with the 13# distribution. 14# * Neither the name of the copyright holders nor the names of 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 "AS IS" 19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28# POSSIBILITY OF SUCH DAMAGE. 29# 30 31SUBDIRS = at90usb82 at90usb162 ata5505 ata6617c ata664251 atmega8u2 atmega16u2 atmega32u2 attiny167 attiny1634 32 33AVR_TARGET = avr35 34AVR_TARGET_DEFS = -D__COMPILING_AVR_LIBC__ 35AVR_TARGET_CFLAGS = -mcall-prologues -Os 36AVR_TARGET_ASFLAGS = 37AVR_INSTALL_DIR = avr35 38 39VPATH = $(top_srcdir)/libc/stdlib:$(top_srcdir)/libc/pmstring:$(top_srcdir)/libc/string:$(top_srcdir)/libc/misc:$(top_srcdir)/libc/stdio:$(top_srcdir)/libm/fplib:$(top_srcdir)/libc/time 40 41if HAS_avr35 42 43AVRLIB_DEVLIST = 44if HAS_at90usb82 45 AVRLIB_DEVLIST += at90usb82 46endif # at90usb82 47if HAS_at90usb162 48 AVRLIB_DEVLIST += at90usb162 49endif # at90usb162 50if HAS_ata5505 51 AVRLIB_DEVLIST += ata5505 52endif # ata5505 53if HAS_ata6617c 54 AVRLIB_DEVLIST += ata6617c 55endif # ata6617c 56if HAS_ata664251 57 AVRLIB_DEVLIST += ata664251 58endif # ata664251 59if HAS_atmega8u2 60 AVRLIB_DEVLIST += atmega8u2 61endif # atmega8u2 62if HAS_atmega16u2 63 AVRLIB_DEVLIST += atmega16u2 64endif # atmega16u2 65if HAS_atmega32u2 66 AVRLIB_DEVLIST += atmega32u2 67endif # atmega32u2 68if HAS_attiny167 69 AVRLIB_DEVLIST += attiny167 70endif # attiny167 71if HAS_attiny1634 72 AVRLIB_DEVLIST += attiny1634 73endif # attiny1634 74 75AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include -I$(top_builddir)/include 76 77AVRLIB_CFLAGS = @CDEBUG@ -Wall -W -Wstrict-prototypes -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS) 78 79AVRLIB_ASFLAGS = -x assembler-with-cpp @ASDEBUG@ -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_ASFLAGS) 80 81AM_CFLAGS = $(AVRLIB_CFLAGS) 82AM_CCASFLAGS = $(AM_CPPFLAGS) $(AVRLIB_ASFLAGS) 83 84__install_dir = $(prefix)/avr/lib/$(AVR_INSTALL_DIR) 85 86avrdir = $(__install_dir) 87avrlibdir = $(__install_dir) 88 89avr_LIBRARIES = \ 90 libc.a \ 91 libprintf_min.a \ 92 libprintf_flt.a \ 93 libscanf_min.a \ 94 libscanf_flt.a \ 95 libm.a 96 97include $(top_srcdir)/libc/stdlib/Rules.am 98include $(top_srcdir)/libc/pmstring/Rules.am 99include $(top_srcdir)/libc/string/Rules.am 100include $(top_srcdir)/libc/misc/Rules.am 101include $(top_srcdir)/libc/stdio/Rules.am 102include $(top_srcdir)/libm/fplib/Rules.am 103include $(top_srcdir)/libc/time/Rules.am 104 105nodist_libc_a_SOURCES = \ 106 $(stdlib_a_c_sources) \ 107 $(stdlib_a_asm_sources) \ 108 $(pmstring_a_c_sources) \ 109 $(pmstring_a_asm_sources) \ 110 $(string_a_c_sources) \ 111 $(string_a_asm_sources) \ 112 $(misc_a_c_sources) \ 113 $(misc_a_asm_sources) \ 114 $(stdio_a_c_sources) \ 115 $(stdio_a_asm_sources) \ 116 $(libm_a_c_sources) \ 117 $(libm_a_asm_sources) \ 118 $(time_a_c_sources) \ 119 $(time_a_asm_sources) 120 121nodist_libm_a_SOURCES = \ 122 $(libm_a_c_sources) \ 123 $(libm_a_asm_sources) 124 125libc_a_LIBADD = \ 126 $(stdio_a_libadd) \ 127 $(misc_a_libadd) 128 129libc_a_DEPENDENCIES = \ 130 $(stdio_a_libadd) \ 131 $(misc_a_libadd) 132 133else 134 135echo all distdir install installdirs clean distclean uninstall check: 136 137endif 138