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 = at90s1200 attiny11 attiny12 attiny15 attiny28 at90s4414 at90s4434 at90s8515 at90s8535 at90c8534 32 33AVR_TARGET = avr2 34AVR_TARGET_DEFS = -D__COMPILING_AVR_LIBC__ 35AVR_TARGET_CFLAGS = -mcall-prologues -Os 36AVR_TARGET_ASFLAGS = 37AVR_INSTALL_DIR = 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_avr2 42 43AVRLIB_DEVLIST = 44if HAS_at90s1200 45 AVRLIB_DEVLIST += at90s1200 46endif # at90s1200 47if HAS_attiny11 48 AVRLIB_DEVLIST += attiny11 49endif # attiny11 50if HAS_attiny12 51 AVRLIB_DEVLIST += attiny12 52endif # attiny12 53if HAS_attiny15 54 AVRLIB_DEVLIST += attiny15 55endif # attiny15 56if HAS_attiny28 57 AVRLIB_DEVLIST += attiny28 58endif # attiny28 59if HAS_at90s4414 60 AVRLIB_DEVLIST += at90s4414 61endif # at90s4414 62if HAS_at90s4434 63 AVRLIB_DEVLIST += at90s4434 64endif # at90s4434 65if HAS_at90s8515 66 AVRLIB_DEVLIST += at90s8515 67endif # at90s8515 68if HAS_at90s8535 69 AVRLIB_DEVLIST += at90s8535 70endif # at90s8535 71if HAS_at90c8534 72 AVRLIB_DEVLIST += at90c8534 73endif # at90c8534 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