1200
|
1 SERVICE=rfid_pn532
|
|
2
|
|
3 nfc-nim/nfc.nim: nfc-nim/nfc.h
|
|
4 c2nim/c2nim nfc-nim/nfc.h
|
|
5
|
|
6 nfc-nim/freefare.nim: nfc-nim/freefare.h
|
|
7 c2nim/c2nim nfc-nim/freefare.h
|
|
8
|
|
9 freefare_demo: freefare_demo.nim nfc-nim/nfc.nim nfc-nim/freefare.nim
|
|
10 nim-0.19.4/bin/nim c -d:nimDebugDlOpen freefare_demo.nim
|
|
11
|
|
12 freefare_demo_run: freefare_demo
|
|
13 ./freefare_demo
|
|
14
|
|
15 rfid: rfid.nim graphserver.nim nfc-nim/nfc.nim nfc-nim/freefare.nim
|
|
16 nim-0.19.4/bin/nim c -d:nimDebugDlOpen rfid.nim
|
|
17
|
|
18 rfid_local_run: rfid
|
|
19 ./rfid
|
|
20
|
|
21
|
|
22 build_image:
|
|
23 rm -rf tmp_ctx
|
|
24 mkdir -p tmp_ctx
|
|
25 cp -a Dockerfile *.nim *.cfg nfc-nim tmp_ctx
|
|
26 docker build --network=host -t bang6:5000/$(SERVICE)_x86:latest tmp_ctx
|
|
27 docker push bang6:5000/$(SERVICE)_x86:latest
|
|
28 rm -rf tmp_ctx
|
|
29
|
|
30
|
|
31 build_image_pi:
|
|
32 rm -rf tmp_ctx
|
|
33 mkdir -p tmp_ctx
|
|
34 cp -a Dockerfile.pi *.nim *.cfg nfc-nim tmp_ctx
|
|
35 docker build --file Dockerfile.pi --network=host -t bang6:5000/$(SERVICE)_pi:latest tmp_ctx
|
|
36 docker push bang6:5000/$(SERVICE)_pi:latest
|
|
37 rm -rf tmp_ctx
|
|
38
|
|
39 shell: build_image
|
|
40 docker run --name rfid_shell --rm -it --cap-add SYS_PTRACE --net=host bang6:5000/$(SERVICE)_x86:latest /bin/bash
|
|
41
|
|
42 local_run: build_image
|
|
43 docker run --name rfid_local --rm -it --net=host bang6:5000/$(SERVICE)_x86:latest
|