-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (31 loc) · 1005 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
41
42
43
44
45
46
SRC_REID := $(wildcard reid/*.go)
SRC_CMD_COMMON := $(wildcard cmd/common/*.go)
SRC_CMD_ENXML := cmd/reid-enxml.go $(SRC_CMD_COMMON) $(SRC_REID)
SRC_CMD_CONVERT := cmd/reid-convert.go $(SRC_CMD_COMMON) $(SRC_REID)
SRC_CMD_SEARCH := cmd/reid-search.go $(SRC_CMD_COMMON) $(SRC_REID)
# De-dup and sort
SRC_ALL := $(sort $(SRC_CMD_ENXML) $(SRC_CMD_CONVERT) $(SRC_CMD_SEARCH) $(SRC_CMD_COMMON) $(SRC_REID))
DEPS := .deps/kingpin.v2
COMMANDS := reid-enxml reid-convert reid-search
GO ?= go
GOFMT ?= gofmt
all: $(DEPS) $(COMMANDS)
reid-enxml: $(SRC_CMD_ENXML)
$(GO) build $<
reid-convert: $(SRC_CMD_CONVERT)
$(GO) build $<
reid-search: $(SRC_CMD_SEARCH)
$(GO) build $<
.deps/kingpin.v2: .deps
$(GO) get -v gopkg.in/alecthomas/kingpin.v2 && touch $@
.deps/gotesseract: .deps
$(GO) get -v github.com/otiai10/gosseract && touch $@
.deps:
@mkdir -p .deps
format: $(SRC_ALL)
$(GOFMT) -w $(SRC_ALL)
clean:
rm -f $(COMMANDS)
realclean: clean
rm -rf .deps
.PHONY: format clean realclean