More fixes for ticket:35, which was reopened.
[debian/gnuradio] / ezdop / src / firmware / Makefile.am
1 # Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
2
3 # This file is part of GNU Radio
4
5 # GNU Radio is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # GNU Radio is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Radio; see the file COPYING.  If not, write to
17 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 # Boston, MA 02111-1307, USA.
19
20 include $(top_srcdir)/Makefile.common
21
22 datadir = $(prefix)/share/ezdop
23
24 # Use avr-gcc versions of compiler and binutils
25 CC=$(AVRGCC)
26 OBJCOPY=$(AVROBJCOPY)
27
28 # What's defined for rest of project not good for avr-gcc (no -pthread for instance)
29 override CFLAGS=
30
31 noinst_PROGRAMS = dopctrl.elf dopctrl.hex  
32       
33 EXTRA_DIST = \
34     dopctrl.hex
35
36 dopctrl_elf_CFLAGS=-mmcu=atmega8 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=$(<:.c=.lst)
37
38 dopctrl_elf_SOURCES = dopctrl.c
39     
40 include_HEADERS = dopctrl.h
41
42 dopctrl.hex : dopctrl.elf
43         $(OBJCOPY) -O ihex -R .eeprom dopctrl.elf dopctrl.hex
44         
45 install-data-local:
46         $(INSTALL_DATA) -D $(top_builddir)/ezdop/src/firmware/dopctrl.hex $(DESTDIR)$(datadir)/dopctrl.hex
47
48 uninstall-local:
49         $(RM) $(DESTDIR)$(datadir)/dopctrl.hex