1# Copyright (c) 2002, 2003, 2004, 2009 Joerg Wunsch
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are met:
6#
7# * Redistributions of source code must retain the above copyright
8#   notice, this list of conditions and the following disclaimer.
9# * Redistributions in binary form must reproduce the above copyright
10#   notice, this list of conditions and the following disclaimer in
11#   the documentation and/or other materials provided with the
12#   distribution.
13# * Neither the name of the copyright holders nor the names of
14#   contributors may be used to endorse or promote products derived
15#   from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27# POSSIBILITY OF SUCH DAMAGE.
28#
29# $Id: Rules.am 2489 2015-10-06 09:43:29Z pitchumani $
30#
31
32include $(top_srcdir)/libc/stdio/Files.am
33
34stdio_a_libadd = vfprintf_std.o vfscanf_std.o
35
36nodist_libprintf_min_a_SOURCES=
37
38libprintf_min_a_LIBADD = vfprintf_min.o
39
40nodist_libprintf_flt_a_SOURCES=
41
42libprintf_flt_a_LIBADD = vfprintf_flt.o
43
44nodist_libscanf_min_a_SOURCES=
45
46libscanf_min_a_LIBADD = vfscanf_min.o
47
48nodist_libscanf_flt_a_SOURCES=
49
50libscanf_flt_a_LIBADD = vfscanf_flt.o
51
52# vfprintf is compiled best with -Os -g -fno-jump-tables (-mno-tablejump),
53# this gives the smallest code.
54PRINTF_CFLAGS = -Os @CDEBUG@ $(FNO_JUMP_TABLES)
55
56vfprintf_min.o: vfprintf.c
57	$(COMPILE) $(PRINTF_CFLAGS) -DPRINTF_LEVEL=PRINTF_MIN -c -o $@ $<
58
59vfprintf_std.o: vfprintf.c
60	$(COMPILE) $(PRINTF_CFLAGS) -DPRINTF_LEVEL=PRINTF_STD -c -o $@ $<
61
62vfprintf_flt.o: vfprintf.c
63	$(COMPILE) $(PRINTF_CFLAGS) -DPRINTF_LEVEL=PRINTF_FLT -c -o $@ $<
64
65vfscanf_min.o: vfscanf.c
66	$(COMPILE) $(PRINTF_CFLAGS) -DSCANF_LEVEL=SCANF_MIN -c -o $@ $<
67
68vfscanf_std.o: vfscanf.c
69	$(COMPILE) $(PRINTF_CFLAGS) -DSCANF_LEVEL=SCANF_STD -c -o $@ $<
70
71vfscanf_flt.o: vfscanf.c
72	$(COMPILE) $(PRINTF_CFLAGS) -DSCANF_LEVEL=SCANF_FLT -c -o $@ $<
73
74# vim: set ft=make:
75