]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - hw/Makefile.inc
GPL headers: Use correct project name.
[sigrok-firmware-fx2lafw.git] / hw / Makefile.inc
CommitLineData
36074319 1##
a986cfff 2## This file is part of the sigrok-firmware-fx2lafw project.
36074319
UH
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
21EXTRA_DIST = dscr.a51
22
23fx2lafw:
24 $(AM_V_at)cd ${top_builddir} && $(MAKE) fx2lafw
25
26if FOUND_OBJCOPY
27$(BASENAME).fw: $(BASENAME).ihx
28 $(AM_V_GEN)$(OBJCOPY) -Iihex $(BASENAME).ihx -Obinary $@
29else
30if FOUND_MAKEBIN
31$(BASENAME).fw: $(BASENAME).ihx
32 $(AM_V_GEN)$(MAKEBIN) -p < $(BASENAME).ihx > $@
33endif
34endif
35
36RELS = ${top_builddir}/fx2lafw.rel ${top_builddir}/gpif-acquisition.rel \
37 ${builddir}/dscr.rel
38
8f4904e5
UH
39$(RELS): fx2lafw
40
36074319
UH
41$(builddir)/dscr.rel: dscr.a51
42 $(AM_V_at)if test "x${abs_top_srcdir}" != "x${abs_top_builddir}"; then \
43 $(INSTALL_DATA) ${srcdir}/dscr.a51 ${builddir}; \
44 fi
45 $(AM_V_GEN)$(SDAS8051) -logs -I${top_srcdir}/include dscr.a51
46
47$(BASENAME).ihx: fx2lafw $(RELS) $(top_builddir)/fx2lib/lib/fx2.lib $(top_builddir)/fx2lib/lib/interrupts/ints.lib
48 $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_FLAGS) -o $@ $(RELS) -L$(top_builddir)/fx2lib/lib fx2.lib interrupts/ints.lib
49
50install-data-local: $(BASENAME).fw
39ac5a27
UH
51 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(FIRMWARE_DIR)
52 $(AM_V_at)$(INSTALL_DATA) $(BASENAME).fw $(DESTDIR)$(FIRMWARE_DIR)
36074319
UH
53
54uninstall-local:
39ac5a27 55 $(AM_V_at)-rm -f $(DESTDIR)$(FIRMWARE_DIR)/$(BASENAME).fw
36074319
UH
56
57clean-local:
58 $(AM_V_at)-rm -f *.lst *.rel *.rst *.sym *.lnk *.map *.mem *.ihx *.fw
59 $(AM_V_at)-rm -f *.cdb *.lk *.omf
60