summaryrefslogtreecommitdiff
path: root/fw/fe310/Makefile
blob: bd61dc09a3aaf03b00975db0ebd5d63279c5e0bd (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
27
28
include common.mk
crypto_dir = $(ext_dir)/crypto
MAKEFLAGS += -I$(fe310_dir)

include $(crypto_dir)/crypto_obj.mk
obj_crypto = $(addprefix $(crypto_dir)/,$(obj_dep))

subdirs_bsp = bsp/drivers bsp/gloss bsp/init
subdirs_ext = $(crypto_dir) $(ext_dir)/fsfat
subdirs = eos eos/soc eos/dev eos/net eos/eve $(subdirs_bsp) $(subdirs_ext)


%.o: %.c
	$(CC) $(CFLAGS) -c $<

all:
	rm -f *.a
	for i in $(subdirs); do \
		(cd $$i && $(MAKE)) || exit; \
	done
	$(AR) rcs libeos-bsp.a $(addsuffix /*.o,$(subdirs_bsp))
	$(AR) rcs libeos-ext.a $(obj_crypto) $(ext_dir)/fsfat/*.o

clean:
	for i in $(subdirs); do \
		(cd $$i && $(MAKE) clean) || exit; \
	done
	rm -f *.o *.a