# Makefile for Unix Astrolog version 3.05 (astrolog@byron.u.washington.edu)
# First created 11/21/1991
#
# This Makefile is included only for convenience. One could easily compile
# Astrolog on a Unix system by hand with the command:
# % cc -c *.c; cc -o astrolog *.o -lm -lX11
#
# Generally, all that needs to be done to compile once astrolog.h has been
# edited, is compile each source file, and link them together with the math
# library, and if applicable, the main X library.
#
NAME = astrolog
#
BINDIR = /usr/local/bin
WORKDIR = /usr/local/astrolog
DATADIR = $(WORKDIR)/data
#
OBJ = data.o general.o formulas.o charts.o options.o driver.o \
  xdata.o xgeneral.o xcharts.o xdriver.o
# If you don't have X windows, delete the "-lX11" part from the line below:
LIBS = -lm -lX11
CFLAGS = -O2 # -Wall -m486
#
.c.o:
	gcc -DDEFAULT_DIR=\"$(WORKDIR)/\" $(CFLAGS) -c $<
#
install:	$(NAME)
	install -s $(NAME) $(BINDIR)
	install -d $(WORKDIR) $(DATADIR)
	cp -f astrolog.dat $(WORKDIR)
	cp -f data/* $(DATADIR)

$(NAME):	$(OBJ)
	gcc -o $(NAME) $(OBJ) $(LIBS)

clean:
	rm -f *.o $(NAME)
#
