LIBS	= -lintl -lncurses -lpcre
SRC	= more.c
OBJS	= more.o
MAN	= more.1
# Suffix of executables. ".exe" on Windows based systems
EXEEXT  = .exe
BINARY  = /usr/bin/more$(EXEEXT)	# Where the binary goes
MANUAL  = /usr/man/man1/more.1		# where the manual page goes
HELP_DIR = /usr/share/more
EXTRA_DIST = more.help*

all: more$(EXEEXT) more.1

more$(EXEEXT): ${OBJS}
	$(CC) $(CFLAGS) -o $@ ${OBJS} $(LIBS)

install: more more.1 
	install -s more$(EXEEXT) $(BINARY)
	install -c more.1 $(MANUAL)
	mkdir -p $(HELP_DIR)
	install -c $(EXTRA_DIST) $(HELP_DIR)

tidy: clean
clean:
	rm -f core more$(EXEEXT) $(OBJS) *.stackdump
