#Define TERMIO for Linux
#XTRA += -DTERMIO
#Define USE_TERMCAP if you want mlist to use the termcap file to figure out
#  your terminal capabilities
XTRA += -DUSE_TERMCAP

# define this if your pager does not wait when viewing a file with less lines 
# than on the screen, more does this for example
#XTRA += PAGER_DOESNOT_WAIT

CC = gcc -g -Wall $(XTRA)

SRC = mlist.c scroll.c curses.c version.c is_tar.c dir.c view.c
OBJ = mlist.o scroll.o curses.o version.o is_tar.o dir.o view.o

LIBS = -ltermcap 
LIBDIR = -L.

.c.o:
	$(CC) -c $<


mlist: $(OBJ)
	$(CC) -o mlist $(OBJ) $(LIBS) $(LIBDIR)

install: mlist
	cp mlist /usr/local/bin

clean:
	rm -f mlist *.o

	
mlist.o:  mlist.c mlist.h config.h
scroll.o: scroll.c mlist.h
curses.o: curses.c curses.h mlist.h
is_tar.o: is_tar.c tar.h
dir.o: dir.c mlist.h
view.o: view.c config.h mlist.h


