#
# Makefile for screen under Ultrix 4.x
#
# See config.h for configuration options.
#
# Marc Boucher <marc@CAM.ORG>
# nothing special about this makefile, except it ensures that BSD environment
# is selected.

# If you choose to compile with the tried and true:
CC= cc
CFLAGS= -YBSD -O 
#CFLAGS= -YBSD -g -DTMPTEST -DDEBUG
#CFLAGS= -YBSD -g 
LDFLAGS=

# If you're using GNU C, be sure to use the -traditional flag:
#CC= gcc
#CFLAGS = -O -fstrength-reduce -fcombine-regs -finline-functions #-Wall
#CFLAGS= -traditional -O -DM_TERMCAP -DNO_PROTOTYPE
#LDFLAGS= -s

#LIBS= nmalloc.o -ltermcap 
LIBS= -ltermcap 

CFILES=	screen.c ansi.c help.c fileio.c mark.c window.c socket.c
OFILES=	screen.o ansi.o help.o fileio.o mark.o window.o socket.o

screen: $(OFILES)
	$(CC) $(CFLAGS) $(LDFLAGS) -o screen $(OFILES) $(LIBS)

screen.o: screen.c screen.h config.h patchlevel.h extern.h
	$(CC) $(CFLAGS) -c screen.c

help.o: help.c screen.h config.h ansi.h extern.h patchlevel.h
	$(CC) $(CFLAGS) -c help.c

fileio.o: fileio.c screen.h config.h extern.h
	$(CC) $(CFLAGS) -c fileio.c

ansi.o: ansi.c screen.h config.h ansi.h extern.h
	$(CC) $(CFLAGS) -c ansi.c

mark.o: mark.c screen.h config.h ansi.h extern.h
	$(CC) $(CFLAGS) -c mark.c

window.o: window.c config.h screen.h  extern.h
	$(CC) $(CFLAGS) -c window.c

socket.o: socket.c config.h screen.h  extern.h
	$(CC) $(CFLAGS) -c socket.c

clean:
	rm -f $(OFILES) screen

lint:
	lint -I. $(CFILES)

saber:
	#load $(CFLAGS) screen.c ansi.c $(LIBS)
