#
# $Id: Makefile,v 1.2 2003/03/28 01:08:38 jonathan Exp $
# ----------------------------------------------------------------------
# AlternC - Web Hosting System
# Copyright (C) 2002 by the AlternC Development Team.
# http://alternc.org/
# ----------------------------------------------------------------------
# Based on:
# Valentin Lacambre's web hosting softwares: http://altern.org/
# ----------------------------------------------------------------------
# LICENSE
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# To read the license please visit http://www.gnu.org/copyleft/gpl.html
# ----------------------------------------------------------------------
# Purpose of file: Makefile des binaires de /usr/lib/alternc
# ----------------------------------------------------------------------
#
default: install

all: mail_add mail_del quota_edit quota_get mem_add mem_del db_create \
 lst_adddom lst_deldom lst_getfile lst_putfile lst_addlst lst_dellst lst_delfile \
 mhonarc wmkdir mailman.create mailman.delete

mhonarc: mhonarc.c
	cc mhonarc.c -o mhonarc
wmkdir: wmkdir.c
	cc wmkdir.c -o wmkdir

db_create: db_create.c
	cc db_create.c -o db_create

quota_get: quota_get.c 
	cc quota_get.c -o quota_get
quota_edit: quota_edit.c
	cc quota_edit.c -o quota_edit 

mail_add: mail_add.c 
	cc mail_add.c -o mail_add
mail_del: mail_del.c 
	cc mail_del.c -o mail_del

mem_add: mem_add.c 
	cc mem_add.c -o mem_add
mem_del: mem_del.c 
	cc mem_del.c -o mem_del

lst_adddom: lst_adddom.c
	cc lst_adddom.c -o lst_adddom
lst_deldom: lst_deldom.c
	cc lst_deldom.c -o lst_deldom
lst_getfile: lst_getfile.c
	cc lst_getfile.c -o lst_getfile
lst_putfile: lst_putfile.c
	cc lst_putfile.c -o lst_putfile
lst_addlst: lst_addlst.c
	cc lst_addlst.c -o lst_addlst
lst_dellst: lst_dellst.c
	cc lst_dellst.c -o lst_dellst
lst_delfile: lst_delfile.c
	cc lst_delfile.c -o lst_delfile

mailman.create: mailman.create.c
	cc mailman.create.c -o mailman.create

mailman.delete: mailman.delete.c
	cc mailman.delete.c -o mailman.delete

install: all
	chmod a+rx,a-w,u+s mail_add mail_del quota_edit quota_get mem_add mem_del db_create mhonarc wmkdir
	chmod a+rx,a-w,u+s,g+s lst_* mailman*
## Devrait etre fait par le paquet debian
#	chown root.root mail_add mail_del quota_edit quota_get mem_add mem_del db_create mhonarc wmkdir
#	chown sympa.sympa lst_*
#	chown root.list mailman*

clean: 
	rm -f *.o *~; \
	for i in mail_add mem_add quota_get db_create lst_delfile mail_del mem_del lst_dellst wmkdir lst_adddom mailman.create mhonarc lst_getfile lst_addlst mailman.delete quota_edit lst_putfile lst_deldom; \
	do rm -f $$i; \
	done
