#  $Id: Makefile.in 0.45 2000/03/05 00:04:05 tom Exp $
###############################################################################
#
#  Generic Makefile to create the `gcal' program by Autoconf.
#
#  Copyright (c) 1994-1997, 2000  Thomas Esken          <esken@uni-muenster.de>
#                                 Im Hagenfeld 84
#                                 D-48147 M"unster
#                                 GERMANY
#
###############################################################################
#
#
#
DEF = -D#
#
#  BEGIN: General program modification symbols,
#           which may be changed by the user !!
#



#  Write the line `USE_EASC = $(DEF)USE_EASC=1'
#    in case you want to use the 8-bit extended IBM-ASCII character set
#    (IBM PC or ISO 8859-1 = ISO Latin-1 or Nextstep character sets).
#
#  Write the line `USE_EASC = $(DEF)USE_EASC=0'
#    in case you want to use the 7-bit ISO-ASCII/EBCDIC character set.
#
#USE_EASC = $(DEF)USE_EASC=1#



#  Write the line `USE_HLS = $(DEF)USE_HLS=1'
#    to run this program using control sequences for highlighting the current
#    day/holidays/text (MS/PC-DOS will use the [n]ansi.sys driver for emitting
#    ANSI escape highlighting sequences; OS2/Linux/UN*X-like systems will use
#    Termcap for emitting the terminal specific highlighting sequences.
#    If this fails, default (generic) ANSI highlighting sequences will be used).
#
#  Write the line `USE_HLS = $(DEF)USE_HLS=0'
#    to run this program without highlighting...
#
#USE_HLS = $(DEF)USE_HLS=1#



#  Write the line `USE_PAGER = $(DEF)USE_PAGER=1'
#    in case you want to use an external pager or if it fails
#    a simple built-in pager.
#
#  Write the line `USE_PAGER = $(DEF)USE_PAGER=0'
#    in case you don't like this feature...
#
#USE_PAGER = $(DEF)USE_PAGER=1#



#  Write the line `USE_RC = $(DEF)USE_RC=1'
#    for using the special month dates functions (print daily / weekly
#    monthly / yearly / eternal / special fixed dates as stated in
#    resource files).
#
#  Write the line `USE_RC = $(DEF)USE_RC=0'
#    if you don't like this feature...
#
#USE_RC = $(DEF)USE_RC=1#



#  Specify, which directories shall be used for the resource files:
#
#  (Define the empty string \"\" if you don't need data directories,
#  so data files are searched in the actual and $HOME directory only)
#
#
#  Name of user (private access) specific data directory
#    (relative to $HOME directory)
#
GCAL_USR_DATADIR = \"share/$(PACKAGE)\"
#
#  Name of system (common access) specific data directory
#    (static to $(datadir) directory, which is normally `$(prefix)/share')
#
GCAL_SYS_DATADIR = `echo \"$(datadir)/$(PACKAGE)\" | sed -e 's,//,/,g'`



#
#
#
DEFINES = \
  $(USE_EASC) \
  $(USE_HLS) \
  $(USE_PAGER) \
  $(USE_RC)

DEFINES2 = \
  $(DEF)GCAL_USR_DATADIR=$(GCAL_USR_DATADIR) \
  $(DEF)GCAL_SYS_DATADIR=$(GCAL_SYS_DATADIR)



#
#  END: general program modification symbols,
#         which may be changed by the user !!
#



#### Start of system configuration section. ####

PACKAGE = @PACKAGE@
VERSION = @VERSION@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
VPATH = @srcdir@

subdir = src

@SET_MAKE@

CC = @CC@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

STRIP = @STRIP@

DEFS = $(DEFINES) $(DEFINES2) $(DEF)LOCALEDIR=\"$(localedir)\" @DEFS@
INTL_LIBS = @INTLLIBS@
MISC_LIBS = @LIBM@ @LIBS@
LIBS = $(INTL_LIBS) $(MISC_LIBS)

CFLAGS = @CFLAGS@
CPPFLAGS = -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl -I$(top_builddir)/intl @CPPFLAGS@
LDFLAGS = @LDFLAGS@

transform = @program_transform_name@

X = @EXEEXT@
# For OS/2 or MSDOS, use: X=.exe

O = @OBJEXT@
# For OS/2 or MSDOS, use: O=.obj

prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localedir = $(prefix)/@DATADIRNAME@/locale
# Where to install the executables.
bindir = @bindir@

#### End of system configuration section. ####



#### Start of package specific make variable definition section. ####

SHELL = /bin/sh

#
# Standard names.
#

SRCS = \
  $(srcdir)/file-io.c \
  $(srcdir)/gcal.c \
  $(srcdir)/hd-astro.c \
  $(srcdir)/hd-data.c \
  $(srcdir)/hd-data1.c \
  $(srcdir)/hd-data2.c \
  $(srcdir)/hd-data3.c \
  $(srcdir)/hd-data4.c \
  $(srcdir)/hd-data5.c \
  $(srcdir)/hd-use.c \
  $(srcdir)/help.c \
  $(srcdir)/print.c \
  $(srcdir)/rc-astro.c \
  $(srcdir)/rc-check.c \
  $(srcdir)/rc-insert.c \
  $(srcdir)/rc-use.c \
  $(srcdir)/rc-utils.c \
  $(srcdir)/regexp.c \
  $(srcdir)/tty.c \
  $(srcdir)/utils.c \
  $(srcdir)/tcal.c \
  $(srcdir)/txt2gcal.c \
  $(srcdir)/gcal2txt.c

COMMON_HDRS = \
  $(srcdir)/common.h \
  $(srcdir)/defines.h \
  $(srcdir)/tailor.h

GCAL_BASE_HDRS = \
  $(srcdir)/file-io.h \
  $(srcdir)/gcal.h \
  $(srcdir)/globals.h \
  $(srcdir)/hd-astro.h \
  $(srcdir)/hd-data.h \
  $(srcdir)/hd-data1.h \
  $(srcdir)/hd-defs.h \
  $(srcdir)/hd-use.h \
  $(srcdir)/help.h \
  $(srcdir)/print.h \
  $(srcdir)/regexp.h \
  $(srcdir)/tty.h \
  $(srcdir)/utils.h

GCAL_HD_HDRS = \
  $(srcdir)/hd-data2.h \
  $(srcdir)/hd-data3.h \
  $(srcdir)/hd-data4.h \
  $(srcdir)/hd-data5.h

GCAL_RC_HDRS = \
  $(srcdir)/rc-astro.h \
  $(srcdir)/rc-check.h \
  $(srcdir)/rc-defs.h \
  $(srcdir)/rc-insert.h \
  $(srcdir)/rc-use.h \
  $(srcdir)/rc-utils.h

GCAL2TXT_HDRS = \
  $(srcdir)/gcal2txt.h

TCAL_HDRS = \
  $(srcdir)/tcal.h

TXT2GCAL_HDRS = \
  $(srcdir)/txt2gcal.h

HDRS = \
  $(COMMON_HDRS) \
  $(GCAL_BASE_HDRS) \
  $(GCAL_HD_HDRS) \
  $(GCAL_RC_HDRS) \
  $(GCAL2TXT_HDRS) \
  $(TCAL_HDRS) \
  $(TXT2GCAL_HDRS)

GCAL_BASE_OBJS = \
  gcal$O \
  file-io$O \
  hd-astro$O \
  hd-data$O \
  hd-data1$O \
  hd-use$O \
  help$O \
  print$O \
  tty$O \
  utils$O

GCAL_HD_OBJS = \
  hd-data2$O \
  hd-data3$O \
  hd-data4$O \
  hd-data5$O

GCAL_RC_OBJS = \
  rc-astro$O \
  rc-check$O \
  rc-insert$O \
  rc-use$O \
  rc-utils$O \
  @REGEX_O@

GCAL2TXT_OBJS = \
  gcal2txt$O

TCAL_OBJS = \
  tcal$O

TXT2GCAL_OBJS = \
  txt2gcal$O

DISTFILES = \
  $(srcdir)/Makefile.in \
  $(SRCS) \
  $(HDRS)

ALLDIRS = \
  $(bindir)

PROGRAMS = \
  $(PACKAGE)$X \
  gcal2txt$X \
  tcal$X \
  txt2gcal$X

#### End of package specific make variable definition section. ####



#### Start of default targets section. ####

.SUFFIXES:
.SUFFIXES: .c $O

default: $(PROGRAMS)

all: default

check: $(PACKAGE)$X
	./$(PACKAGE)$X -f /dev/null -Cxdt > ./_$(PACKAGE).test 2>&1
	if test "`wc -l < ./_$(PACKAGE).test`" -eq 3; \
	then \
	  echo "OK ./$(PACKAGE)$X test"; \
	else \
	  echo "FAILED ./$(PACKAGE)$X test: program buggy - report to author"; \
	  exit 1; \
	fi
	-rm -f ./_$(PACKAGE).test

tags: TAGS

TAGS: $(HDRS) $(SRCS)
	here=`pwd`; \
	cd $(srcdir) && etags -o $$here/TAGS $(HDRS) $(SRCS)

id: ID

ID: $(HDRS) $(SRCS)
	here=`pwd`; \
	cd $(srcdir) && mkid -f$$here/ID $(HDRS) $(SRCS)

#### End of default targets section. ####



#### Start of specific targets section. ####

#
# 'configure' works only on Unix systems. For other systems able to make
# sense of this makefile, you can define target specific entries here.
# For other systems such as MSDOS, separate Makefiles are
# provided in subdirectories.
#

#
# NeXT 2.x, 3.0, 3.1 thin. For gcc, replace -bsd with -D__STRICT_BSD__.
#
next:
	$(MAKE) all \
	CFLAGS="-O -bsd -DNeXT" \
	DEFS="-UHAVE_STDLIB_H -UHAVE_STRING_H"
#
# NeXT 3.1 fat (68k + 386). For gcc, replace -bsd with -D__STRICT_BSD__.
#
next-fat:
	$(MAKE) all \
	CFLAGS="-O2 -bsd -fno-builtin -DNeXT" \
	DEFS="-UHAVE_STDLIB_H -UHAVE_STRING_H"

#
# gcc with emx 0.8f kit (use by preference os2/makefile.emx)
#
os2_gcc:
	$(MAKE) all \
	CC=gcc \
	CFLAGS="-O -DOS2" \
	X=".exe"

#
# Xenix 2.3.2 for 286:
#
xenix_286:
	$(MAKE) all \
	CFLAGS="-DXENIX -HUGE -M2h"

#
# Coherent (with broken /bin/sh):
#
coherent:
	$(MAKE) all \
	CFLAGS="-DCOHERENT" \
	DEFS="-DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1"

#### End of specific targets section. ####



#### Start of implicit rules section. ####

.c$O:
	@echo "Compiling \`$<' ..."
	$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<

#### End of implicit rules section. ####



#### Start of actual build-related targets section. ####

#
# Try to create the object files and the resulting executable file.
#

$(PACKAGE)$X: Makefile $(GCAL_BASE_OBJS) @GCAL_HD_OBJS@ @GCAL_RC_OBJS@
	@echo "Linking object files to \`$@'"
	$(CC) $(LDFLAGS) -o $@ $(GCAL_BASE_OBJS) @GCAL_HD_OBJS@ @GCAL_RC_OBJS@ $(LIBS)
	@echo "Executable file \`$@' created"

$(GCAL_BASE_OBJS) @GCAL_HD_OBJS@ @GCAL_RC_OBJS@: ../config.h \
  $(COMMON_HDRS) $(GCAL_BASE_HDRS) \
  $(GCAL_HD_HDRS) \
  $(GCAL_RC_HDRS)

gcal2txt$X: Makefile $(GCAL2TXT_OBJS)
	@echo "Linking object files to \`$@'"
	$(CC) $(LDFLAGS) -o $@ $(GCAL2TXT_OBJS) $(LIBS)
	@echo "Executable file \`$@' created"

$(GCAL2TXT_OBJS): ../config.h $(COMMON_HDRS) $(GCAL_RC_HDRS) $(GCAL2TXT_HDRS)

tcal$X: Makefile $(TCAL_OBJS)
	@echo "Linking object files to \`$@'"
	$(CC) $(LDFLAGS) -o $@ $(TCAL_OBJS) $(LIBS)
	@echo "Executable file \`$@' created"

$(TCAL_OBJS): ../config.h $(COMMON_HDRS) $(GCAL_RC_HDRS) $(TCAL_HDRS)

txt2gcal$X: Makefile $(TXT2GCAL_OBJS)
	@echo "Linking object files to \`$@'"
	$(CC) $(LDFLAGS) -o $@ $(TXT2GCAL_OBJS) $(LIBS)
	@echo "Executable file \`$@' created"

$(TXT2GCAL_OBJS): ../config.h $(COMMON_HDRS) $(GCAL_RC_HDRS) $(TXT2GCAL_HDRS)

#### End of actual build-related targets section. ####



#### Start of install section. ####

install: installdirs installbin
	@echo "All installs in $(subdir) done"

installdirs: $(top_srcdir)/mkinstalldirs
	$(NORMAL_INSTALL)
	$(SHELL) $(top_srcdir)/mkinstalldirs $(ALLDIRS)

installbin: all installdirs
	$(NORMAL_INSTALL)
	for file in $(PROGRAMS); \
	do \
	  echo "Installing \`$$file' as \`$(bindir)/`echo "$$file" | sed '$(transform)'`'"; \
	  $(INSTALL_PROGRAM) $$file $(bindir)/`echo "$$file" | sed '$(transform)'`; \
	done
	@echo "Binary files installed"

install-strip:
	$(NORMAL_INSTALL)
	if test -n "$(STRIP)"; \
	then \
	  $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' installbin; \
	else \
	  echo "Target $@ disabled, \`$(INSTALL) -s' does not work"; \
	  echo "Installing without stripping instead"; \
	  $(MAKE) installbin; \
	fi

uninstall:
	$(NORMAL_UNINSTALL)
	-for file in $(PROGRAMS); \
	do \
	  rm -f $(bindir)/`echo "$$file" | sed '$(transform)'`; \
	done
	@echo "Binary files of distribution uninstalled"

#### End of install section. ####



#### Start of clean section. ####

clean:
	-rm -f *$O \
	       $(PROGRAMS) \
	       a.out \
	       core \
	       *~ \
	       *.tmp \
	       _$(PACKAGE).test

distclean: clean
	-rm -f Makefile

mostlyclean: distclean

realclean: distclean
	-rm -f id ID tags TAGS

maintainer-clean: realclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

#### End of clean section. ####



dist dist-$(PACKAGE) distzip distzoo distlha distshar MANIFEST: Makefile $(DISTFILES)

Makefile: $(srcdir)/Makefile.in ../config.status
	cd .. \
	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
	       $(SHELL) ./config.status



# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

# End of file
