Merged jcorgan/ezdop into trunk.
[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 = \
32     dopctrl.elf \
33     dopctrl.hex  
34       
35 EXTRA_DIST = \
36     dopctrl.hex
37
38 dopctrl_elf_CFLAGS=-mmcu=atmega8 -funsigned-char -funsigned-bitfields \
39                    -fpack-struct -fshort-enums -Wall -Wstrict-prototypes \
40                    -Wa,-adhlns=$(<:.c=.lst)
41
42 dopctrl_elf_SOURCES = \
43     dopctrl.c
44     
45 #dopctrl_elfdir = $(includedir)
46
47 include_HEADERS = \
48     dopctrl.h
49
50 %.hex: %.elf
51         $(OBJCOPY) -O ihex -R .eeprom $< $@
52
53 dopctrl.hex : dopctrl.elf
54
55 install-data-local:
56         $(INSTALL_DATA) -D $(top_builddir)/ezdop/src/firmware/dopctrl.hex $(DESTDIR)$(datadir)/dopctrl.hex
57
58 uninstall-local:
59         $(RM) $(DESTDIR)$(datadir)/dopctrl.hex
60