Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / lib / pic16 / libio / mkmk.sh
blob211604e633a6c280f05bdd2f7f350778892f230d
1 #!/bin/sh
4 # Script to generate Makefile.am,
5 # execute in device/lib/pic16/libio/ with no arguments.
7 # Written by Raphael Neider <tecodev AT users sourceforge net>
9 # Released under the terms of the GPL v2.
12 cat <<HEREDOC
13 ## Makefile.am -- Process this file with automake to produce Makefile.in
14 ## This file was automatically generated using $0.
16 lib_LIBRARIES =
18 HEREDOC
20 for f in "../../../non-free/lib/pic16/libdev/pic1"*.c; do
21 p="${f##*/pic}";
22 p="${p%.c}";
23 P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
24 echo "Generating for device >>${p}<<" >&2;
25 cat <<HERE
26 if ENABLE_$P
27 lib_LIBRARIES += libio${p}.a
28 endif ENABLE_$P
29 libio${p}_a_SOURCES = dummy.c
30 HERE
31 sed -e 's/\s*\(#.*\)\{0,1\}$//' adc.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No adc." >&2 ; } || cat <<HERE
32 libio${p}_a_SOURCES += adc/adcbusy.c adc/adcclose.c adc/adcconv.c
33 libio${p}_a_SOURCES += adc/adcopen.c adc/adcread.c adc/adcsetch.c
34 HERE
35 sed -e 's/\s*\(#.*\)\{0,1\}$//' i2c.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No i2c." >&2 ; } || cat <<HERE
36 libio${p}_a_SOURCES += i2c/i2cack.c i2c/i2cclose.c i2c/i2cdrdy.c
37 libio${p}_a_SOURCES += i2c/i2cidle.c i2c/i2cnack.c i2c/i2copen.c
38 libio${p}_a_SOURCES += i2c/i2creadc.c i2c/i2creads.c i2c/i2crestart.c
39 libio${p}_a_SOURCES += i2c/i2cstart.c i2c/i2cstop.c i2c/i2cwritec.c
40 libio${p}_a_SOURCES += i2c/i2cwrites.c
41 HERE
42 sed -e 's/\s*\(#.*\)\{0,1\}$//' usart.ignore | grep -x "$p" > /dev/null 2>&1 && { echo "No usart." >&2 ; } || cat <<HERE
43 libio${p}_a_SOURCES += usart/ubaud.c usart/ubusy.c usart/uclose.c
44 libio${p}_a_SOURCES += usart/udrdy.c usart/ugetc.c usart/ugets.c
45 libio${p}_a_SOURCES += usart/uopen.c usart/uputc.c usart/uputs.c
46 libio${p}_a_SOURCES += usart/usartd.c
47 HERE
48 cat <<HERE
49 libio${p}_a_CFLAGS = -p${p} \$(AM_CFLAGS)
51 HERE
52 done
54 cat <<HEREDOC
55 include \$(top_srcdir)/Makefile.common
57 HEREDOC