]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blob - fx2lib/lib/Makefile
Import fx2lib into fx2lafw directly.
[sigrok-firmware-fx2lafw.git] / fx2lib / lib / Makefile
1 # Copyright (C) 2009 Ubixum, Inc. 
2
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
16
17 SOURCES = serial.c i2c.c delay.c setupdat.c gpif.c eputils.c $(wildcard interrupts/*.c)
18 FX2_OBJS = $(patsubst %.c,%.rel, $(SOURCES)) usbav.rel int4av.rel
19 INCLUDES = -I../include
20 SDCC = sdcc -mmcs51 $(SDCCFLAGS)
21 LIBS = fx2.lib
22
23 all: $(LIBS)
24
25 $(LIBS): $(FX2_OBJS)
26         sdcclib fx2.lib $?
27
28 usbav.rel: usbav.a51
29         sdas8051 -logs usbav.a51
30
31 int4av.rel: int4av.a51
32         sdas8051 -logs int4av.a51
33
34 %.rel: %.c
35         $(SDCC) $(INCLUDES) -c $< -o $@
36
37 clean:
38         rm -f *.{asm,ihx,lnk,lst,map,mem,rel,rst,sym,adb,cdb,lib}
39         rm -f interrupts/*.{asm,ihx,lnk,lst,map,mem,rel,rst,sym,adb,dcb,lib}
40