Imported Upstream version 3.2.2
[debian/gnuradio] / usrp / firmware / lib / Makefile.am
1 #
2 # Copyright 2003 Free Software Foundation, Inc.
3
4 # This file is part of GNU Radio
5
6 # GNU Radio 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 3, or (at your option)
9 # any later version.
10
11 # GNU Radio 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 GNU Radio; see the file COPYING.  If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street,
19 # Boston, MA 02110-1301, USA.
20
21
22 EXTRA_DIST =            \
23         delay.c         \
24         fx2utils.c      \
25         i2c.c           \
26         isr.c           \
27         timer.c         \
28         usb_common.c
29
30
31
32 DEFINES=
33 FW_INCLUDES=-I$(top_srcdir)/usrp/firmware/include
34
35 # with EA = 0, the FX2 implements a portion of the 8051 "external memory"
36 # on chip.  This memory is mapped like this:
37 #
38 # The bottom 8K of memory (0x0000 - 0x1fff) is used for both data and
39 # code accesses.  There's also 512 bytes for data only from 0xe000 - 0xe1ff.
40 #
41 # We tell the linker to start the xdata segment at 0x1800, 6K up from
42 # the bottom.
43
44 LINKOPTS = --code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800
45
46 LIBRARY = libfx2.lib
47
48 LIBOBJS =               \
49         delay.rel       \
50         fx2utils.rel    \
51         i2c.rel         \
52         isr.rel         \
53         timer.rel       \
54         usb_common.rel
55
56
57
58 all: libfx2.lib
59
60 .c.rel:
61         $(XCC) $(FW_INCLUDES) $(DEFINES) -c $< -o $@
62
63 $(LIBRARY): $(LIBOBJS)
64         -rm -f $(LIBRARY)
65         touch $(LIBRARY)
66         for obj in $(LIBOBJS); do basename $$obj .rel >> $(LIBRARY) ; done
67
68
69 CLEANFILES = \
70         *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib
71
72 DISTCLEANFILES = \
73         *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib
74
75 install: all
76
77
78 # dependencies
79