# Makefile for XCurses library
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
# the configure script by "--srcdir=DIR".
#

SHELL		= /bin/sh
THIS		= Makefile

@SET_MAKE@

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

PDCURSES_HOME		=$(srcdir)/..
PDCURSES_CURSES_H		=$(PDCURSES_HOME)/curses.h

INSTALL		= @INSTALL@
INSTALL_DATA	= @INSTALL_DATA@

LN_S		= @LN_S@

CC		= @CC@
CFLAGS		= @CFLAGS@

INCDIR		= $(srcdir)
CPPFLAGS	= -I$(INCDIR) -I$(srcdir)/.. -I.. @DEFS@ -DXCURSES @SYS_DEFS@

CCFLAGS		= -c $(CFLAGS) $(CPPFLAGS) @MH_XINC_DIR@

LINK		= $(CC)
LDFLAGS		= @LDFLAGS@ @LIBS@

RANLIB		= @RANLIB@

LIBRARIES	= libpanel.a

################################################################################
all :	$(LIBRARIES)

install : 
	echo Does nothing at the moment

clean :
	-rm -rf *.o trace $(LIBRARIES)

distclean: clean
	-rm -f Makefile

mostlyclean: clean

realclean: distclean

#------------------------------------------------------------------------

OBJS = \
panel.o

libpanel.a : $(OBJS)
	ar rv $@ $?
	-$(RANLIB) $@

panel.o: $(srcdir)/panel.c $(PDCURSES_HOME)/panel.h $(PDCURSES_CURSES_H)
	$(CC) $(CCFLAGS) -o $@ $(srcdir)/panel.c
