# Generated automatically from Makefile.in by configure.
# Makefile for panels source code.
#
# This makes the following:
#	libraries (normal/debug/profile/shared)
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
# the configure script by "--srcdir=DIR".
#
# The rules are organized to produce the libraries for the configured models,

# turn off _all_ suffix rules; we'll generate our own

srcdir = $(basedir)/panel

include ../misc/Makefile.inc

LIBRARIES	=  ../lib/panel2.dll ../lib/panel.lib ../lib/panel.a

################################################################################
all ::	../include/panel.h $(LIBRARIES)

install :: install.libs

install.libs:: $(includedir) $(libdir)
	$(INSTALL_DATA) $(srcdir)/panel.h $(includedir)/panel.h

# make a copy to simplify include-paths while still keeping panel's include
# file in this directory.
../include/panel.h : $(srcdir)/panel.h
	-rm -f $@
	cp $(srcdir)/panel.h $@

tags:
	ctags *.[ch]

TAGS:
	etags *.[ch]

clean ::
	-rm -f tags TAGS *~ ../include/panel.h

mostlyclean: clean

###############################################################################
# The remainder of this file is automatically generated during configuration
###############################################################################

SHARED_OBJS = ../obj_s/panel.obj

../lib/panel2.dll : $(SHARED_OBJS) ../misc/panel.def ../lib/ncurses.lib
	@-rm -f $@
	$(MK_SHARED_LIB) $+ ../lib/ncurses.lib

../lib/panel.lib : ../misc/panel.def
	@-rm -f $@
	emximp -o $@ $+

install.libs \
install.panel :: $(libdir) ../lib/panel2.dll $(dlldir) ../lib/panel.lib
	@echo installing ../lib/panel2.dll as $(dlldir)/panel2.dll
	@echo installing ../lib/panel.lib as $(libdir)/panel2.dll
	$(INSTALL) ../lib/panel2.dll $(dlldir)/panel2.dll
	$(INSTALL) ../lib/panel.lib $(libdir)/panel.lib

clean ::
	rm -f ../lib/panel2.dll ../lib/panel/lib
	rm -f $(SHARED_OBJS)

# Library objects

../obj_s/panel.obj :	$(srcdir)/panel.c \
			$(srcdir)/panel.h
	cd ..\obj_s && $(CC) $(CFLAGS_SHARED) -c ../panel/panel.c


NORMAL_OBJS = \
	../objects/panel.o

../lib/panel.a : $(NORMAL_OBJS)
	ar rv $@ $?
	$(RANLIB) $@

install.libs \
install.panel :: $(libdir) ../lib/panel.a
	@echo installing ../lib/panel.a as $(libdir)/panel.a 
	$(INSTALL_DATA) ../lib/panel.a $(libdir)/panel.a 
	$(RANLIB) $(libdir)/panel.a

clean ::
	rm -f ../lib/panel.a
	rm -f $(NORMAL_OBJS)

# Library objects

../objects/panel.o :	$(srcdir)/panel.c \
			$(srcdir)/panel.h
	$(CC) $(CFLAGS_NORMAL) -o $@ -c ../panel/panel.c

