-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 958 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
37
38
39
40
ACQUIRE ?= $(shell realpath ../Acquire)
SUBDIR := 5-Aligned
TARGETS := 23-03-31_69 23-03-31_77
default:
@echo Available targets:
@echo 1. clean - Clean up calibration files
@echo 2. DataSet - Gather all dataset files and create a zip
DataSet: dir $(patsubst %,$(ACQUIRE)/%, $(TARGETS))
dir:
@rm -rf DataSet
@mkdir -p DataSet/raw
@mkdir -p DataSet/ref
@mkdir -p DataSet/img
DataSet.zip: DataSet
@zip -r0 $@ DataSet/*
@unzip -l $@
$(ACQUIRE_HOME)/%: dir
$(info $@)
$(eval PREFIX:=$(shell basename $@))
$(eval LIST:=$(shell cat $@/$(SUBDIR)/list.txt | xargs))
@for ID in $(LIST); do \
ln -Tsf $@/$(SUBDIR)/raw/$$ID.npy DataSet/raw/$(PREFIX)_$$ID.npy; \
ln -Tsf $@/$(SUBDIR)/ref/$$ID.npy DataSet/ref/$(PREFIX)_$$ID.npy; \
ln -Tsf $@/$(SUBDIR)/$$ID.png DataSet/img/$(PREFIX)_$$ID.png; \
done
clean:
rm -rf $(shell python3 env.py | xargs)
rm -rf data/runtime.ini
.PHONY: default dir DataSet DataSet.zip $(ACQUIRE_HOME)/% clean