From 3f913efda03fd840cd526ef72e6f397c7da61bd7 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 9 Aug 2022 22:23:08 +0200 Subject: code layout --- fw/fe310/Makefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'fw/fe310/Makefile') diff --git a/fw/fe310/Makefile b/fw/fe310/Makefile index f9da883..70bacff 100644 --- a/fw/fe310/Makefile +++ b/fw/fe310/Makefile @@ -5,25 +5,24 @@ MAKEFLAGS += -I$(fe310_dir) include $(crypto_dir)/crypto_obj.mk obj_crypto = $(addprefix $(crypto_dir)/,$(obj_dep)) -subdirs = bsp/drivers bsp/gloss bsp/metal eos eos/i2c eos/eve eos/eve/screen eos/eve/widget $(ext_dir)/fsfat +subdirs_bsp = bsp/drivers bsp/gloss bsp/metal +subdirs_ext = $(crypto_dir) $(ext_dir)/fsfat +subdirs = eos eos/soc eos/dev eos/net eos/eve $(subdirs_bsp) $(subdirs_ext) -all: libeos.a %.o: %.c $(CC) $(CFLAGS) -c $< -libeos.a: - for i in $(subdirs) $(crypto_dir); do \ - (cd $$i && $(MAKE)) || exit; \ - done - rm -f $@ +all: + rm -f *.a for i in $(subdirs); do \ - $(AR) rcs $@ $$i/*.o; \ + (cd $$i && $(MAKE)) || exit; \ done - $(AR) rcs $@ $(obj_crypto) + $(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) $(crypto_dir); do \ + for i in $(subdirs); do \ (cd $$i && $(MAKE) clean) || exit; \ done rm -f *.o *.a -- cgit v1.2.3