-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 771 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (25 loc) · 771 Bytes
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
IMAGE_VERSION = latest
REGISTRY = docker.io/hsimwong
IMAGE = ${REGISTRY}/dkmission:${IMAGE_VERSION}
PREFIX = /usr/local
#.PHONY: build
all: manager worker
manager: dependency
GOOS=linux go build -o build/manager app/manager_main.go
worker: dependency
GOOS=linux go build -o build/worker app/worker_main.go
dockerize:
docker build -t ${IMAGE} .
pushImage:
docker push ${IMAGE}
clean:
rm -rf ./build
rm $(PREFIX)/lib/libdarknet.so
rm $(PREFIX)/include/darknet.h
dependency: darknetinstall
sudo apt install imagemagick -y
cd processor && gcc -c processor.c -L. -ldarknet -Wl,-rpath,$PWD/libdarknet.so
darknetinstall:
cp processor/libdarknet.so $(PREFIX)/lib
cp processor/darknet.h $(PREFIX)/include
sudo ldconfig