]>
Commit | Line | Data |
---|---|---|
36074319 UH |
1 | ## |
2 | ## This file is part of the fx2lafw project. | |
3 | ## | |
4 | ## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de> | |
5 | ## | |
6 | ## This program is free software; you can redistribute it and/or modify | |
7 | ## it under the terms of the GNU General Public License as published by | |
8 | ## the Free Software Foundation; either version 2 of the License, or | |
9 | ## (at your option) any later version. | |
10 | ## | |
11 | ## This program is distributed in the hope that it will be useful, | |
12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ## GNU General Public License for more details. | |
15 | ## | |
16 | ## You should have received a copy of the GNU General Public License | |
17 | ## along with this program; if not, write to the Free Software | |
18 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | ## | |
20 | ||
21 | EXTRA_DIST = dscr.a51 | |
22 | ||
23 | fx2lafw: | |
24 | $(AM_V_at)cd ${top_builddir} && $(MAKE) fx2lafw | |
25 | ||
26 | if FOUND_OBJCOPY | |
27 | $(BASENAME).fw: $(BASENAME).ihx | |
28 | $(AM_V_GEN)$(OBJCOPY) -Iihex $(BASENAME).ihx -Obinary $@ | |
29 | else | |
30 | if FOUND_MAKEBIN | |
31 | $(BASENAME).fw: $(BASENAME).ihx | |
32 | $(AM_V_GEN)$(MAKEBIN) -p < $(BASENAME).ihx > $@ | |
33 | endif | |
34 | endif | |
35 | ||
36 | RELS = ${top_builddir}/fx2lafw.rel ${top_builddir}/gpif-acquisition.rel \ | |
37 | ${builddir}/dscr.rel | |
38 | ||
39 | $(builddir)/dscr.rel: dscr.a51 | |
40 | $(AM_V_at)if test "x${abs_top_srcdir}" != "x${abs_top_builddir}"; then \ | |
41 | $(INSTALL_DATA) ${srcdir}/dscr.a51 ${builddir}; \ | |
42 | fi | |
43 | $(AM_V_GEN)$(SDAS8051) -logs -I${top_srcdir}/include dscr.a51 | |
44 | ||
45 | $(BASENAME).ihx: fx2lafw $(RELS) $(top_builddir)/fx2lib/lib/fx2.lib $(top_builddir)/fx2lib/lib/interrupts/ints.lib | |
46 | $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_FLAGS) -o $@ $(RELS) -L$(top_builddir)/fx2lib/lib fx2.lib interrupts/ints.lib | |
47 | ||
48 | install-data-local: $(BASENAME).fw | |
39ac5a27 UH |
49 | $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(FIRMWARE_DIR) |
50 | $(AM_V_at)$(INSTALL_DATA) $(BASENAME).fw $(DESTDIR)$(FIRMWARE_DIR) | |
36074319 UH |
51 | |
52 | uninstall-local: | |
39ac5a27 | 53 | $(AM_V_at)-rm -f $(DESTDIR)$(FIRMWARE_DIR)/$(BASENAME).fw |
36074319 UH |
54 | |
55 | clean-local: | |
56 | $(AM_V_at)-rm -f *.lst *.rel *.rst *.sym *.lnk *.map *.mem *.ihx *.fw | |
57 | $(AM_V_at)-rm -f *.cdb *.lk *.omf | |
58 |