]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - fx2lib/lib/Makefile
Import fx2lib into fx2lafw directly.
[sigrok-firmware-fx2lafw.git] / fx2lib / lib / Makefile
CommitLineData
3608c106
UH
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
17SOURCES = serial.c i2c.c delay.c setupdat.c gpif.c eputils.c $(wildcard interrupts/*.c)
18FX2_OBJS = $(patsubst %.c,%.rel, $(SOURCES)) usbav.rel int4av.rel
19INCLUDES = -I../include
20SDCC = sdcc -mmcs51 $(SDCCFLAGS)
21LIBS = fx2.lib
22
23all: $(LIBS)
24
25$(LIBS): $(FX2_OBJS)
26 sdcclib fx2.lib $?
27
28usbav.rel: usbav.a51
29 sdas8051 -logs usbav.a51
30
31int4av.rel: int4av.a51
32 sdas8051 -logs int4av.a51
33
34%.rel: %.c
35 $(SDCC) $(INCLUDES) -c $< -o $@
36
37clean:
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