33 lines
552 B
Makefile
33 lines
552 B
Makefile
# Makefile
|
|
|
|
ifeq ($(origin CMAKE_COMMAND),undefined)
|
|
CMAKE_COMMAND := cmake
|
|
else
|
|
CMAKE_COMMAND := ${CMAKE_COMMAND}
|
|
endif
|
|
|
|
.PHONY: all checkout compile
|
|
|
|
all: checkout
|
|
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
|
|
cd build && $(MAKE)
|
|
|
|
checkout:
|
|
git submodule init
|
|
git submodule update --init --recursive
|
|
|
|
compile:
|
|
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
|
|
cd build && $(MAKE)
|
|
|
|
clean:
|
|
rm -rf build yosys/install
|
|
|
|
build/Makefile:
|
|
make checkout
|
|
|
|
.PHONY: Makefile
|
|
|
|
%: build/Makefile
|
|
cd build && $(MAKE) $@
|