view service/rfid_pn532/makefile @ 1200:fe97a15ddd6e

more nim progress on rfid reader Ignore-this: 762e256b911e74db2b2103b509250e9f darcs-hash:cfda5d2da1483a6126d473a42c0cec994561e2ec
author drewp <drewp@bigasterisk.com>
date Thu, 21 Feb 2019 09:58:56 -0800
parents
children 56af0ca2db10
line wrap: on
line source

SERVICE=rfid_pn532

nfc-nim/nfc.nim: nfc-nim/nfc.h
	c2nim/c2nim  nfc-nim/nfc.h

nfc-nim/freefare.nim: nfc-nim/freefare.h
	c2nim/c2nim  nfc-nim/freefare.h

freefare_demo: freefare_demo.nim nfc-nim/nfc.nim nfc-nim/freefare.nim
	nim-0.19.4/bin/nim c -d:nimDebugDlOpen freefare_demo.nim

freefare_demo_run: freefare_demo
	./freefare_demo

rfid: rfid.nim graphserver.nim nfc-nim/nfc.nim nfc-nim/freefare.nim
	nim-0.19.4/bin/nim c -d:nimDebugDlOpen rfid.nim

rfid_local_run: rfid
	./rfid


build_image:
	rm -rf tmp_ctx
	mkdir -p tmp_ctx
	cp -a Dockerfile *.nim *.cfg nfc-nim tmp_ctx
	docker build --network=host -t bang6:5000/$(SERVICE)_x86:latest tmp_ctx
	docker push bang6:5000/$(SERVICE)_x86:latest
	rm -rf tmp_ctx


build_image_pi:
	rm -rf tmp_ctx
	mkdir -p tmp_ctx
	cp -a Dockerfile.pi *.nim *.cfg nfc-nim tmp_ctx
	docker build --file Dockerfile.pi --network=host -t bang6:5000/$(SERVICE)_pi:latest tmp_ctx
	docker push bang6:5000/$(SERVICE)_pi:latest
	rm -rf tmp_ctx

shell: build_image
	docker run --name rfid_shell --rm -it --cap-add SYS_PTRACE --net=host bang6:5000/$(SERVICE)_x86:latest  /bin/bash

local_run: build_image
	docker run --name rfid_local --rm -it --net=host bang6:5000/$(SERVICE)_x86:latest