#------------------------------------------------------------------------
#  DOWNSCRIPT
#  Copyright (c) 1998-1999  Andrew Apted  <ajapted@netspace.net.au>
#------------------------------------------------------------------------
#
#  MAKEFILE
#
#------------------------------------------------------------------------
#
#  Targets
#
#    all, source: make the executables.
#
#    clean: remove the executables and the .o files.
#
#    install: does nothing (yet, anyway).
#
#------------------------------------------------------------------------

TOPDIR=.

include $(TOPDIR)/Makerules


PROGRAMS=downscript

OBJECTS=memory.o parse.o list.o sort.o fonts.o chars.o stringbox.o \
        graphics.o input.o output.o rawout.o debug.o html.o ascii.o \
	nroff.o parabox.o linebox.o page.o document.o main.o

HEADERS=memory.h parse.h list.h sort.h fonts.h chars.h stringbox.h \
	graphics.h input.h output.h rawout.h debug.h html.h ascii.h \
	nroff.h parabox.h linebox.h page.h document.h maths.h

CFLAGS  += $(INCLUDE) $(OPTFLAGS)
LDFLAGS += $(LIBS) -lggi


all: source

source: $(PROGRAMS)

clean:
	rm -f *.o $(PROGRAMS)

install: source
	@echo
	@echo Installing DownScript...
	@echo
	install -m 755 downscript $(BINDIR)/downscript


downscript: $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o downscript


$(OBJECTS): $(HEADERS)


.PHONY: all source clean install
