4 # Consider using running 'sh update.sh' in '..' instead to
5 # also update the automake conditionals ENABLE_xxx!
7 # Script to generate Makefile.am,
8 # execute in device/lib/pic16/libdev/ with no arguments.
10 # For this to work, sdcc from PATH must already use the latest
11 # pic16fdevices.txt including to-be-added devices!
13 # Written by Raphael Neider <tecodev AT users sourceforge net>
15 # Released under the terms of the GPL v2.
19 ## Makefile.am -- Process this file with automake to produce Makefile.in
20 ## This file has been automatically generated using $0.
26 for f
in .
/pic1
*.c
; do
30 ARCH
=$
(echo "$arch" |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
);
33 lib_LIBRARIES += libdev${arch}.a
35 libdev${arch}_a_SOURCES = pic${arch}.c
39 sdcc
-mpic16 -p${arch} --nostdinc -I../../../../include/pic16 -I../../../../include -I../../../include/pic16 -o pic${arch}.inc -E pic${arch}.c
;
40 if grep '\bEEADRH\b' pic
${arch}.inc
>/dev
/null
2>&1; then
41 # 16 bit EEPROM address space
44 echo "libdev${arch}_a_SOURCES += gptr/eeprom16_gptr${i}${j}_dispatch.S";
47 elif grep '\bEEADR\b' pic
${arch}.inc
>/dev
/null
2>&1; then
48 # 8 bit EEPROM address space
51 echo "libdev${arch}_a_SOURCES += gptr/eeprom8_gptr${i}${j}_dispatch.S";
56 echo "libdev${arch}_a_SOURCES += gptr/dispatch.S";
59 if ! grep '\bSSPBUF\b' pic
${arch}.inc
>/dev
/null
2>&1; then
60 echo "libdev${arch}_a_SOURCES += fake_sspbuf.c";
64 echo "libdev${arch}_a_CFLAGS = -p${arch} \$(AM_CFLAGS)";
69 include \$(top_srcdir)/Makefile.common