###############################################################################
#
#    AntiRight
#    (c) 2004-2006 Jeffrey Bedard
#    antiright@gmail.com
# 
#    This file is part of AntiRight.
#
#     AntiRight is free software; you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation; either version 2 of the License, or
#     (at your option) any later version.
#
#     AntiRight 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.
#
#     You should have received a copy of the GNU General Public License
#     along with AntiRight; if not, write to the Free Software
#     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA		
#
###############################################################################

include config.mk


all: dateload.o
	cc -o dateload dateload.o
	
clean:
	rm -f dateload dateload.o

distclean: clean
	rm config.mk

INSTALL_PROGRAM=$(INSTALL) -c -s
INSTALL_SCRIPT=$(INSTALL) -c -m 755
INSTALL_DATA=$(INSTALL) -c -m 644
INSTALL_DIR=$(INSTALL) -d
bindir=$(PREFIX)/bin
mandir=$(PREFIX)/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
datadir=$(PREFIX)/share
docdir=$(datadir)/doc
icondir=$(datadir)/antiright/icons

install: all
	$(INSTALL_DIR) $(bindir) $(man1dir) $(man2dir) $(docdir)/antiright\
	 $(datadir)/antiright $(icondir)
	$(INSTALL_DATA) system.antiright $(datadir)/antiright/
	$(INSTALL_SCRIPT) ACE $(bindir)
	$(INSTALL_DATA) *.1 $(man1dir)
	$(INSTALL_DATA) *.5 $(man5dir)
	$(INSTALL_DATA) COPYING $(docdir)/antiright
	$(INSTALL_DATA) AUTHORS $(docdir)/antiright
	$(INSTALL_DATA) icons/* $(icondir)
	$(INSTALL_PROGRAM) dateload $(bindir)

bzball: distclean
	cd .. && tar cjf ACE-desktop-$(VERSION).tar.bz2 ACE-desktop

