Build: Only try to do make if a Makefile is there
subdirs += $(wildcard hls_*) $(wildcard hdl_*)
+# Build all subdirs is normally not needed, but useful to check if
+# all HLS code synthesizes well.
all: $(subdirs)
-# Only build if the subdirectory is really existent
+# Only build if the subdirectory is existent and if Makefile is there
.PHONY: $(subdirs)
$(subdirs):
- @if [ -d $@ ]; then \
+ @if [ -d $@ -a -f $@/Makefile ]; then \
$(MAKE) -C $@ || exit 1; \
fi
+# Cleanup for all subdirectories.
+# Only dive into subdirectory if existent and if Makefile is there.
clean:
@for dir in $(subdirs); do \
- if [ -d $$dir ]; then \
+ if [ -d $$dir -a -f $$dir/Makefile ]; then \
$(MAKE) -C $$dir $@ || exit 1; \
fi \
done
