# $Id: Makefile,v 1.6 2004/07/16 01:00:19 nadim Exp $

include ../../build/config.mk

all: prayer-demo

prayer-demo: astro.o prayer.o prayer-demo.c
	@echo "==> Building demo..."
	$(CC) $(CFLAGS) astro.o prayer.o prayer-demo.c -o prayer-demo -lm

prayer.o: prayer.c prayer.h astro.h
	@echo "==> Building libprayer components..."
	$(CC) $(CFLAGS) -c prayer.c -o prayer.o

astro.o: astro.c astro.h prayer.h
	$(CC) $(CFLAGS) -c astro.c -o astro.o

libitl: all
	@echo "==> Create symbolic links for library generation..."
	ln -sf ../prayertime/src/prayer.h ../../build/ITL_prayer.h
	ln -sf ../prayertime/src/prayer.o ../../build/prayer.o
	ln -sf ../prayertime/src/astro.o ../../build/astro.o

clean:
	rm -f *.o *~ *.core prayer-demo

# If got error below, then make again:
# x:40:33: Cannot assign type 'double (*)' to 'int (*)
pysolat:
	python setup.py build_ext --inplace
