-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 807 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PROJECT = vpr-extract
IMAGE = "$(PROJECT)-dev"
VOLUME = "$(shell pwd):/var/$(PROJECT)"
USER = "$(shell id -u):$(shell id -g)"
BUILD = build
ifeq ($(CONFIG),)
CONFIG = Debug
endif
ifeq ($(VERBOSE),)
VERBOSE = 1
endif
all: local-build
local-build: $(BUILD)
cmake --build $(BUILD)
local-install: $(BUILD)
cmake --build $(BUILD) --target install
docker-container:
docker build . --file Dockerfile --tag $(IMAGE)
docker-session:
docker run --interactive --tty --volume $(VOLUME) --user $(USER) $(IMAGE) /bin/bash
docker-build:
docker run --volume $(VOLUME) --user $(USER) $(IMAGE) /bin/bash -c "make local-build CONFIG=$(CONFIG) VERBOSE=$(VERBOSE)"
$(BUILD): CMakeLists.txt
cmake -B $@ -DCMAKE_BUILD_TYPE=$(CONFIG)
clean:
rm -fr ./build ./bin
rm -f $(shell find . -name "*.bin")