#### CONFIGURATION

PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man

# gcc-4.1 needs -Wno-pointer-sign
CUSTOM_CFLAGS=-Wall -ggdb
SYS_CFLAGS=
LIBS += -lncurses

LD=ld
AR=ar

### CONFIGURATION END

ifndef INSTALL
INSTALL=/usr/bin/install
endif

export
unexport INCLUDES
INCLUDES=-I.


OBJS=main.o
SUBDIRS=config eval file term ui
LOCALLIBS=config/config.a file/file.a term/term.a ui/ui.a eval/eval.a

all: all-recursive hed

hed: $(OBJS) $(LOCALLIBS)
	$(call cmd,link)

# install-recursive?
install:
	$(INSTALL) -D ./hed $(DESTDIR)$(BINDIR)/hed
	$(INSTALL) -D -m 644 ../doc/hed.1 $(DESTDIR)$(MANDIR)/man1/hed.1


clean: clean-recursive
	rm -rf hed *.o

-include Makefile.lib
