# Autogenerated by SCAM 0.7.0


scam-all: scam-all-subdirs scam-all-local
prefix=/usr/


#
# Now user added rules (maybe modified by scams)
#

FULLNAME=librework-3.0
VERSION=3.0
NAME=librework
PACKAGE=librework-erp

all: permissions.py

permissions.py: 
	sed "s/#define \([A-Z_]*\)[ ]*\([0-9]\)/\1=\2/g" ../../src/common/permisos.h | grep "^[A-Z_]*=[0-9]*" > permissions.py

tpvtux-web.conf: config
	cp config tpvtux-web.conf


# Additional tagets by scam:
DISTBASE=../.././librework-3.0/./web/barpda


dist: 
	rm -rf $(DISTBASE) || true
	mkdir -p $(DISTBASE)
	cp Makefile.scam $(DISTBASE)
	cp permissions.py $(DISTBASE)
	cp config $(DISTBASE)
	(cd static && make dist)


dist2: 
	rm -rf $(DISTBASE) || true
	mkdir -p $(DISTBASE)
	cp Makefile.scam $(DISTBASE)
	cp permissions.py $(DISTBASE)
	cp config $(DISTBASE)
	(cd static && make dist)


scam-all-local: all permissions.py tpvtux-web.conf

scam-all-subdirs: 
	(cd static && ( $(MAKE) .depends || true ) && $(MAKE) )


distclean: clean
	@rm -f Makefile
	@rm -f *.pyc
	@(cd static && $(MAKE) distclean)



clean: 
	@rm -rf all
	@rm -rf tpvtux-web.conf
	@rm -rf *~
	@rm -rf *.o
	@(cd static && touch .depends && $(MAKE) clean)


install: clients.kid index.kid common.kid shop.kid ticket_template.kid table.kid error.kid tpvtux.py permissions.py session.py config.py perms.py bar.py ticket.py tpvtux-web.sh tpvtux-web.conf
	mkdir -p $(prefix)/share/apps/tpvtux/web
	install clients.kid $(prefix)/share/apps/tpvtux/web/clients.kid
	install index.kid $(prefix)/share/apps/tpvtux/web/index.kid
	install common.kid $(prefix)/share/apps/tpvtux/web/common.kid
	install shop.kid $(prefix)/share/apps/tpvtux/web/shop.kid
	install ticket_template.kid $(prefix)/share/apps/tpvtux/web/ticket_template.kid
	install table.kid $(prefix)/share/apps/tpvtux/web/table.kid
	install error.kid $(prefix)/share/apps/tpvtux/web/error.kid
	install tpvtux.py $(prefix)/share/apps/tpvtux/web/tpvtux.py
	install permissions.py $(prefix)/share/apps/tpvtux/web/permissions.py
	install session.py $(prefix)/share/apps/tpvtux/web/session.py
	install config.py $(prefix)/share/apps/tpvtux/web/config.py
	install perms.py $(prefix)/share/apps/tpvtux/web/perms.py
	install bar.py $(prefix)/share/apps/tpvtux/web/bar.py
	install ticket.py $(prefix)/share/apps/tpvtux/web/ticket.py
	mkdir -p $(prefix)/bin
	install tpvtux-web.sh $(prefix)/bin/tpvtux-web.sh
	mkdir -p $(prefix)/../etc
	install tpvtux-web.conf $(prefix)/../etc/tpvtux-web.conf
	@(cd static && $(MAKE) install)


uninstall: 
	rm -f $(prefix)/share/apps/tpvtux/web/clients.kid
	rm -f $(prefix)/share/apps/tpvtux/web/index.kid
	rm -f $(prefix)/share/apps/tpvtux/web/common.kid
	rm -f $(prefix)/share/apps/tpvtux/web/shop.kid
	rm -f $(prefix)/share/apps/tpvtux/web/ticket_template.kid
	rm -f $(prefix)/share/apps/tpvtux/web/table.kid
	rm -f $(prefix)/share/apps/tpvtux/web/error.kid
	rm -f $(prefix)/share/apps/tpvtux/web/tpvtux.py
	rm -f $(prefix)/share/apps/tpvtux/web/permissions.py
	rm -f $(prefix)/share/apps/tpvtux/web/session.py
	rm -f $(prefix)/share/apps/tpvtux/web/config.py
	rm -f $(prefix)/share/apps/tpvtux/web/perms.py
	rm -f $(prefix)/share/apps/tpvtux/web/bar.py
	rm -f $(prefix)/share/apps/tpvtux/web/ticket.py
	rm -f $(prefix)/bin/tpvtux-web.sh
	rm -f $(prefix)/../etc/tpvtux-web.conf
	@(cd static && $(MAKE) uninstall)

