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 =  atxmega64a3 atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3 atxmega64d3 atxmega64d4
32
33AVR_TARGET          = avrxmega4
34AVR_TARGET_DEFS     = -D__COMPILING_AVR_LIBC__
35AVR_TARGET_CFLAGS   = -Os $(FNO_JUMP_TABLES)
36AVR_TARGET_ASFLAGS  =
37AVR_INSTALL_DIR     = avrxmega4
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_avrxmega4
42
43AVRLIB_DEVLIST =
44if HAS_atxmega64a3
45  AVRLIB_DEVLIST += atxmega64a3
46endif	# atxmega64a3
47if HAS_atxmega64a3u
48  AVRLIB_DEVLIST += atxmega64a3u
49endif	# atxmega64a3u
50if HAS_atxmega64a4u
51  AVRLIB_DEVLIST += atxmega64a4u
52endif	# atxmega64a4u
53if HAS_atxmega64b1
54  AVRLIB_DEVLIST += atxmega64b1
55endif	# atxmega64b1
56if HAS_atxmega64b3
57  AVRLIB_DEVLIST += atxmega64b3
58endif	# atxmega64b3
59if HAS_atxmega64c3
60  AVRLIB_DEVLIST += atxmega64c3
61endif	# atxmega64c3
62if HAS_atxmega64d3
63  AVRLIB_DEVLIST += atxmega64d3
64endif	# atxmega64d3
65if HAS_atxmega64d4
66  AVRLIB_DEVLIST += atxmega64d4
67endif	# atxmega64d4
68
69AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include -I$(top_builddir)/include
70
71AVRLIB_CFLAGS = @CDEBUG@ -Wall -W -Wstrict-prototypes -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_CFLAGS)
72
73AVRLIB_ASFLAGS = -x assembler-with-cpp @ASDEBUG@ -mmcu=$(AVR_TARGET) $(AVR_TARGET_DEFS) $(AVR_TARGET_ASFLAGS)
74
75AM_CFLAGS = $(AVRLIB_CFLAGS)
76AM_CCASFLAGS = $(AM_CPPFLAGS) $(AVRLIB_ASFLAGS)
77
78__install_dir = $(prefix)/avr/lib/$(AVR_INSTALL_DIR)
79
80avrdir = $(__install_dir)
81avrlibdir = $(__install_dir)
82
83avr_LIBRARIES = \
84	libc.a \
85	libprintf_min.a \
86	libprintf_flt.a \
87	libscanf_min.a \
88	libscanf_flt.a \
89	libm.a
90
91include $(top_srcdir)/libc/stdlib/Rules.am
92include $(top_srcdir)/libc/pmstring/Rules.am
93include $(top_srcdir)/libc/string/Rules.am
94include $(top_srcdir)/libc/misc/Rules.am
95include $(top_srcdir)/libc/stdio/Rules.am
96include $(top_srcdir)/libm/fplib/Rules.am
97include $(top_srcdir)/libc/time/Rules.am
98
99nodist_libc_a_SOURCES = \
100	$(stdlib_a_c_sources) \
101	$(stdlib_a_asm_sources) \
102	$(pmstring_a_c_sources) \
103	$(pmstring_a_asm_sources) \
104	$(string_a_c_sources) \
105	$(string_a_asm_sources) \
106	$(misc_a_c_sources) \
107	$(misc_a_asm_sources) \
108	$(stdio_a_c_sources) \
109	$(stdio_a_asm_sources) \
110	$(libm_a_c_sources) \
111	$(libm_a_asm_sources) \
112	$(time_a_c_sources) \
113	$(time_a_asm_sources)
114
115nodist_libm_a_SOURCES = \
116	$(libm_a_c_sources) \
117	$(libm_a_asm_sources)
118
119libc_a_LIBADD = \
120	$(stdio_a_libadd) \
121	$(misc_a_libadd)
122
123libc_a_DEPENDENCIES = \
124	$(stdio_a_libadd) \
125	$(misc_a_libadd)
126
127else
128
129echo all distdir install installdirs clean distclean uninstall check:
130
131endif
132