#binary files
OBJ=avacl
#NB source files
SRC= 
# DOCUMENTATION
DOCS= Makefile
#Other files that need to be checked eg configs
LOCATION=/usr/local
VERSION=0.1.0
CC=/usr/bin/gcc
#CFLAGS= -Wall -DDEBUG
CFLAGS= -Wall -O3
PROFILE=
CFLAGS += ${PROFILE}

default: avacl

.c.o:
	${CC} ${CFLAGS} -c $*.c
	
all: ${OBJ} 


	
avacl: avacl.c blocks.o strlower.o usersdb.o
	${CC} ${CFLAGS} avacl.c blocks.o strlower.o usersdb.o -o avacl

install: ${OBJ}
	mkdir -p ${LOCATION}/avacl
	chmod 775 ${LOCATION}/avacl
	install -s -c -m 755 -o root -g bin avacl ${LOCATION}/avacl
	install -c -m 755 -o root -g bin filetype.block ${LOCATION}/avacl
	install -c -m 755 -o root -g bin filename.block ${LOCATION}/avacl
	install -c -m 755 -o root -g bin filetext.block ${LOCATION}/avacl
	install -c -m 755 -o root -g bin users.db ${LOCATION}/avacl
	install -c -m 755 -o root -g bin avacl.conf ${LOCATION}/avacl
	
clean:
	rm -rf *.o *core ${OBJ}
