#  Simple makefile for NCursesPanel demo
#
#  NOTE:  This demo requires the panels library. 

SHELL		= /bin/sh

srcdir		= @srcdir@
VPATH		= @srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
libdir		= $(exec_prefix)/lib
includedir	= @includedir@

CC		= @CXX@
CFLAGS		= @CXXFLAGS@

CPPFLAGS	= @INCLUDES@ -DHAVE_CONFIG_H

CCFLAGS		= $(CPPFLAGS) $(CFLAGS)

LINK		= $(CC)
LDFLAGS		= -L../lib -L$(libdir) @LDFLAGS@ @LD_MODEL@ @LIBS@

.SUFFIXES: .cc
.cc.o:
	@echo compiling $@
	@$(CC) -c $(CCFLAGS) -o $*.o $(srcdir)/$*.cc

all: demo

DEPS_DEMO = cursesw.o cursesp.o demo.o
demo: $(DEPS_DEMO)
	$(LINK) -o $@ $(DEPS_DEMO) $(LDFLAGS) -lpanel@DFT_ARG_SUFFIX@ -lncurses@DFT_ARG_SUFFIX@ -lg++

cursesp.o: $(srcdir)/cursesp.cc
cursesw.o: $(srcdir)/cursesw.cc
demo.o:    $(srcdir)/demo.cc

install:

clean:
	-rm -f *.o demo

distclean: clean
	-rm -f Makefile

mostlyclean: clean

realclean: distclean
