#
#       @(#)Makefile.customer 1.7 90/06/19 
#
#	Makefile for the textsw example programs for XView programmers
#

INCLUDE 	= -I${OPENWINHOME}/include

#
# If you want to compile for debugging, change "-O" to "-g"
#

CFLAGS		= ${INCLUDE} -O

# if you want special to pass special loader options to ld, set
# LDFLAGS= ...
#

XVIEW_LIBS 	= -L${OPENWINHOME}/lib \
		  -lxview -lolgx -lX11

CURSES_LIBS	= -lcurses -ltermlib

CFILES		= sample_tty.c \
		  textsw.c \
		  textsw.font.c \
		  textsw_to_ttysw.c \
		  xv_termsw.c
	   
OBJS		= sample_tty \
		  textsw \
		  textsw.font \
		  textsw_to_ttysw \
		  xv_termsw

CURSES_OBJS	= ttycurses

all:  ${OBJS} ${CURSES_OBJS}

${OBJS}: $$@.c $$@.o 
	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $@.o ${XVIEW_LIBS}

${CURSES_OBJS}: $$@.c $$@.o 
	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $@.o ${XVIEW_LIBS} ${CURSES_LIBS}

clean:
	rm -f core ${OBJS} ${CURSES_OBJS} *.o
