CDEBUGFLAGS=	-O
CFLAGS=		$(CDEBUGFLAGS)
ROOTDIR=	/mit/sipb
BINDIR=		$(ROOTDIR)/bin
MANDIR=		$(ROOTDIR)/man
MANSECT=	1

#ifdef vax
CC=gcc
#endif

OBJ= hebcal.o greg.o error.o danlib.o
all: hebcal

hebcal:  $(OBJ)
	 $(CC) $(OBJ) -o hebcal

install: all hebcal.1
	install -c -s hebcal $(DESTDIR)$(BINDIR)/hebcal
	install -c -m 0444 hebcal.1 $(DESTDIR)$(MANDIR)/man$(MANSECT)/hebcal.$(MANSECT)

clean:
	-rm -f *.o *~ hebcal

depend:

Makefile: Imakefile
	-rm -f Makefile.bak
	-mv Makefile Makefile.bak
	imake -I. -TImakefile -f /dev/null
