BIN	     = /usr/local/bin
LIB	     = /usr/local/lib

CC       = gcc
CFLAGS   = -g -DUNIX

SRC   = actions.c advent.c command.c creatures.c data.c \
	endgame.c functions.c global.c help.c invent.c lib.c \
	messages.c move.c scenes.c strings.c objects.c trace.c

INCL  = 

OBJ   = command.o creatures.o endgame.o functions.o global.o lib.o \
	scenes.o strings.o objects.o

MAN   = adventure.man
D_MAN    = /usr/tmp/man
MISC     = 
TAR      = .


all:	adv

adv:	advent.c $(OBJ)
	$(CC) $(CFLAGS) -o adv advent.c $(OBJ) -lm -ltermcap

clean:
	/bin/rm -f *.o adventure adventure.tar adventure.tar.Z adventure.ba

install:
	cp adventure $(BIN)
	cp adventure.man $(D_MAN)/adventure.l

dist:
	make clean
	tar cvf adventure.tar $(TAR)

tip:
	make clean
	tar cvf adventure.tar Makefile $(SRC) $(INCL) $(MAN) $(MISC)
	compress adventure.tar
	btoa < adventure.tar.Z > adventure.ba
	/bin/rm adventure.tar.Z
	wc -l adventure.ba
	/.attbin/sum adventure.ba

