You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
663 B
35 lines
663 B
COMMON_LIB_DIR?=${PWD}/lib
|
|
TEST_DIRS=$(shell dirname $(wildcard */Makefile))
|
|
|
|
DIRS=googletest hello-simulator kaleidoscope common
|
|
CLEANDIRS = $(DIRS:%=clean-%)
|
|
|
|
.PHONY: subdirs $(CLEANDIRS)
|
|
.PHONY: subdirs $(DIRS)
|
|
|
|
clean: googletest/Makefile $(CLEANDIRS)
|
|
rm -rf "$(COMMON_LIB_DIR)"
|
|
|
|
$(CLEANDIRS):
|
|
cd $(@:clean-%=%) && $(MAKE) clean
|
|
|
|
all: ${TEST_DIRS}
|
|
@echo TEST_DIRS="${TEST_DIRS}"
|
|
|
|
googletest: googletest/Makefile
|
|
cd googletest && $(MAKE)
|
|
|
|
googletest/Makefile:
|
|
cd googletest && cmake .
|
|
|
|
common:
|
|
cd common && COMMON_LIB_DIR="${COMMON_LIB_DIR}" $(MAKE)
|
|
|
|
hello-simulator:
|
|
@:
|
|
|
|
%: common googletest
|
|
cd "$@" && $(MAKE)
|
|
|
|
.PHONY: googletest build-libs common
|