#
# T.C.F.S. Utils 2.0 $Revision: 2.8 $
#
# Authors:	Giuseppe Cattaneo, <cattaneo@udsab.dia.unisa.it>
#		Giuseppe Persiano, <giuper@udsab.dia.unisa.it>
#		Luigi Catuogno, <luicat@mikonos.dia.unisa.it>
#		Angelo Celentano, <angcel@mikonos.dia.unisa.it>
#		Andrea Cozzolino, <andcoz@mikonos.dia.unisa.it>
#		Aniello Del Sorbo, <anidel@mikonos.dia.unisa.it>
#		Ermelindo Mauriello, <ermmau@mikonos.dia.unisa.it>
#		Raffaele Pisapia, <rafpis@mikonos.dia.unisa.it>
#
# Permission  to use,  copy,  and modify this  software  without fee
# is hereby granted, provided that this entire notice is included in
# all  copies  of  any  software  which  is  or includes  a copy  or
# modification of this  software and in all copies of the supporting
# documentation for such software.
#
# This  software maybe  be used for  any purpose provided  the above 
# copyright  notice  is  retained.  It is  supplied as  is, with  no 
# warranty expressed or implied.
#

#
#       $Source: /home/anidel/Wip/TCFS-2.2.0a/tcfsutils-1.2.1/src/RCS/Makefile,v $
#        $State: Exp $
#
#     $Revision: 2.8 $
#       $Author: anidel $
#         $Date: 1999/01/25 16:03:39 $
#       $Locker:  $
#              
# -+-_== 

MAJOR=1
MINOR=2
RELEASE=1

BINDIR=/usr/local/bin
SBINDIR=/usr/local/sbin

OBJS=tcfsadduser.o tcfserrors.o tcfsgenkey.o tcfsputkey.o \
	tcfsrmkey.o tcfsrmuser.o tcfsviewkey.o unix_auth.o \
	show_usage.o tcfsaddgroup.o tcfsrmgroup.o

SRCS=tcfsadduser.c tcfserrors.c tcfsgenkey.c tcfsputkey.c \
	tcfsrmkey.c tcfsrmuser.c tcfsviewkey.c unix_auth.c \
	show_usage.c tcfsaddgroup.c tcfsrmgroup.c

NORMAL_BINS=tcfsgenkey tcfsputkey tcfsrmkey tcfsviewkey
ROOT_BINS=tcfsadduser tcfsrmuser tcfsaddgroup tcfsrmgroup
BINS=$(NORMAL_BINS) $(ROOT_BINS)

CC=gcc
CFLAGS=-g -I../include -DGDBM_SUPPORT -DSHADOW_PASSWORD \
	-DMAJOR=$(MAJOR) -DMINOR=$(MINOR) -DRELEASE=$(RELEASE)
LDFLAGS=

# Uncomment line below is you use GLIBC
#LOADLIBES=-lcrypt -ltcfs
# Uncomment the line below is you do not have GLIBC
LOADLIBES=-ltcfs

all: $(BINS)

dep:
	makedepend $(SRCS)

tcfsaddgroup: tcfsaddgroup.o tcfserrors.o show_usage.o unix_auth.o

tcfsadduser: tcfsadduser.o tcfserrors.o show_usage.o

tcfsrmuser: tcfsrmuser.o tcfserrors.o show_usage.o

tcfsgenkey: tcfsgenkey.o tcfserrors.o unix_auth.o show_usage.o

tcfsputkey: tcfsputkey.o tcfserrors.o unix_auth.o show_usage.o

tcfsrmkey: tcfsrmkey.o tcfserrors.o show_usage.o

tcfsviewkey: tcfsviewkey.o tcfserrors.o unix_auth.o show_usage.o

tcfsrmgroup: tcfsrmgroup.o tcfserrors.o show_usage.o

clean:
	@rm -f *.o *.bak $(BINS)

install: $(BINS)
	install -d -g bin -o root -m755 $(BINDIR) $(SBINDIR)
	install -g bin -o root -m4755 $(NORMAL_BINS) $(BINDIR)
	install -g bin -o root -m4755 $(ROOT_BINS) $(SBINDIR)
