summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 6836132e70be2c193430a49727bd27396041ed5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SRC=src/main.vala src/device.vala src/scannersession.vala  src/db.vala src/audio.vala src/web.vala src/graph-data.vala src/template.vala src/websession.vala src/admin.vala src/price.vapi src/ui/*.vala
DEPS=--pkg posix --pkg linux --pkg libsoup-2.4 --pkg sqlite3 --pkg gee-1.0 --pkg gio-2.0 --pkg gstreamer-0.10 --pkg libarchive --pkg gpgme --pkg curses -X -lncursesw
FLAGS=-X -lgpgme -X -w --enable-experimental --thread --vapidir=vapi

barcode-scanner: $(SRC)
	valac-0.16 --output $@ $(FLAGS) $(DEPS) $^

shop.db: sql/tables.sql sql/views.sql sql/trigger.sql
	@for file in $^ ; do \
		echo "sqlite3 shop.db < $$file"; \
		sqlite3 shop.db < $$file; \
	done

run: barcode-scanner
	./barcode-scanner /dev/ttyS0

clean:
	@rm -f barcode-scanner src/*.c

.PHONY: clean install