version 4.1.0 from http://fpga4u.epfl.ch/wiki/FX2
[fx2fw-sdcc] / fx2 / Makefile
1 #-----------------------------------------------------------------------------\r
2 \r
3 # Makefile for FX2 library code\r
4 \r
5 #-----------------------------------------------------------------------------\r
6 \r
7 # Copyright (C) 2007 Kolja Waschk, ixo.de\r
8 \r
9 #-----------------------------------------------------------------------------\r
10 \r
11 # This code is part of usbjtag. usbjtag is free software; you can redistribute\r
12 \r
13 # it and/or modify it under the terms of the GNU General Public License as\r
14 \r
15 # published by the Free Software Foundation; either version 2 of the License,\r
16 \r
17 # or (at your option) any later version. usbjtag is distributed in the hope\r
18 \r
19 # that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\r
20 \r
21 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
22 \r
23 # GNU General Public License for more details.  You should have received a\r
24 \r
25 # copy of the GNU General Public License along with this program in the file\r
26 \r
27 # COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin\r
28 \r
29 # St, Fifth Floor, Boston, MA  02110-1301  USA\r
30 \r
31 #-----------------------------------------------------------------------------\r
32 \r
33 \r
34 \r
35 CC=sdcc\r
36 \r
37 CFLAGS+=-mmcs51 --no-xinit-opt -I.\r
38 \r
39 CPPFLAGS+=\r
40 \r
41 \r
42 \r
43 %.rel : %.c\r
44 \r
45         $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@\r
46 \r
47 \r
48 \r
49 libfx2.lib: delay.rel fx2utils.rel i2c.rel isr.rel timer.rel usb_common.rel\r
50 \r
51         rm -f $@\r
52 \r
53         touch $@\r
54 \r
55         for obj in $^ ; do basename $$obj .rel >> $@ ; done\r
56 \r
57 \r
58 \r
59 clean:\r
60 \r
61         rm -f *.lst *.asm *.lib *.sym *.rel *.lib\r
62 \r
63 \r
64 \r
65 \r
66 \r
67 \r
68 \r
69 \r
70 \r