OSDN Git Service

64a025f430f4185e52beeef4290e00291b928efc
[libbfin32/libbfin32.git] / Makefile
1 CC            = bfin-elf-gcc
2 AR                        = bfin-elf-ar
3 CCFLAGS       =  -O0 -g
4 ARFLAGS           = -r -c
5 LIB                       = libbfin32.a
6 FIRDIR = algorithm_fir/algorithm_fir
7 VECDIR = algorithm_vector/algorithm_vector
8 NCODIR = algorithm_nco/algorithm_nco
9 OBJS          = $(VECDIR)/fr32_vector_add.o $(VECDIR)/fr32_vector_add_svv.o \
10                                 $(VECDIR)/fr32_vector_sub.o $(VECDIR)/fr32_vector_sub_svv.o \
11                                 $(VECDIR)/fr32_vector_mul.o     $(VECDIR)/fr32_vector_mul_svv.o \
12                                 $(VECDIR)/fr32_vector_complex_mul.o $(VECDIR)/fr32_vector_neg.o \
13                                 $(VECDIR)/fr32_vector_fill.o
14 SUBDIRS = $(FIRDIR) $(VECDIR) $(NCODIR)
15 TARGET = libbfin32.a
16 INCLUDEDIR = include
17
18 all : $(LIB)
19         rm $(INCLUDEDIR) -f -r
20         mkdir $(INCLUDEDIR) 
21         cp $(FIRDIR)/fr32_fir.h $(INCLUDEDIR)
22         cp $(VECDIR)/fr32_vector.h $(INCLUDEDIR)
23         cp $(NCODIR)/fr32_nco.h $(INCLUDEDIR)
24         cp bfin32.h $(INCLUDEDIR)
25
26 $(LIB):$(SUBDIRS)
27         $(AR) $(ARFLAGS) $(TARGET) $(OBJS)
28
29 $(SUBDIRS): FORCE
30         $(MAKE)  -C $@ $(MAKECMDGOALS)
31
32 clean: $(SUBDIRS)
33
34 FORCE:
35
36 .c.o:
37         $(CC) $(CCFLAGS) -c $<
38
39 .S.o:
40         $(CC) $(CCFLAGS) -c $<
41
42