#
# Makefile for Debian hdate
#
# Edited for Debian GNU/Linux Jan 2001
# by Muhammad Hussain Yusuf
# based on original by
# Waleed A. Muhanna
# Ohio State University
# November, 1992
#
#
#
# See the README file for PTLOC for other
# locations
# The praytime bin is built using London
# as the default

PTLOC= London, England     51 30 N    00 10 W     +0    N


CC= gcc
CFLAGS= -O 
C_OPTS = -O -DPTLOC=\""$(PTLOC)"\"
DESTDIR=

all: hdate hcal praytime

hdate: hdate.o hconv.o
	$(CC) $(CFLAGS) -o hdate hdate.o hconv.o -lm

hcal: hcal.o hconv.o
	$(CC) $(CFLAGS) -o hcal hcal.o hconv.o -lm
	
praytime: praytime.c hconv.o
	$(CC) $(C_OPTS) -o praytime praytime.c hconv.o -lm

install: hcal hdate praytime  
	install	-s hcal $(DESTDIR)/usr/bin
	install	-s hdate $(DESTDIR)/usr/bin
	install	-s praytime $(DESTDIR)/usr/bin
	install -m 644 hdate.1 $(DESTDIR)/usr/share/man/man1
	install -m 644 hcal.1 $(DESTDIR)/usr/share/man/man1
	install -m 644 praytime.1 $(DESTDIR)/usr/share/man/man1
		

clean:
	rm -f hdate hcal hdate.o hcal.o hconv.o praytime praytime.o

hdate.o hcal.o hconv.o: hconv.h
