OpenFPGA/Makefile

33 lines
538 B
Makefile
Raw Normal View History

2020-12-08 10:52:35 -06:00
# Makefile
ifeq ($(origin CMAKE_COMMAND),undefined)
CMAKE_COMMAND := cmake
else
CMAKE_COMMAND := ${CMAKE_COMMAND}
endif
.PHONY: all checkout compile
2020-12-08 10:52:35 -06:00
all: checkout
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
cd build && $(MAKE)
2020-12-08 10:52:35 -06:00
checkout:
2020-12-08 10:52:35 -06:00
git submodule init
git submodule update --init --recursive
compile:
2020-12-08 10:52:35 -06:00
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
cd build && $(MAKE)
clean:
rm -rf build
2020-12-08 10:52:35 -06:00
build/Makefile:
make checkout
2020-12-08 10:52:35 -06:00
.PHONY: Makefile
%: build/Makefile
cd build && $(MAKE) $@