summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/lib/Makefile
blob: 4056e91b82b0eaddec6745cb542e60cfcb58e138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
INCLUDES=-I../include/
-include ../Makefile.inc

LIBNAME=mini
CSRCS=vsprintf.c string.c ctype.c printf.c console.c
SSRCS=changebit.S clearbit.S div64.S lib1funcs.S memcpy.S memset.S setbit.S testchangebit.S testclearbit.S testsetbit.S

COBJS=$(CSRCS:.c=.o)
SOBJS=$(SSRCS:.S=.o)
OBJS=$(COBJS) $(SOBJS)

LST=$(OBJS:.o=.lst)

all:	lib$(LIBNAME).a

$(COBJS): %.o : %.c
	$(CROSS_COMPILE)$(CC) $(CFLAGS) -c -o $@ $^

$(SOBJS): %.o : %.S
	$(CROSS_COMPILE)$(CC) $(ASFLAGS) -c -o $@ $^

lib$(LIBNAME).a: $(OBJS)
	$(CROSS_COMPILE)$(AR) cru $@ $^

clean:
	rm -f *.a $(OBJS) $(LST)