## Process this file with automake to produce Makefile.in -*-Makefile-*-
AUTOMAKE_OPTIONS = ansi2knr

OBJEXT = @OBJEXT@

EXTRA_PROGRAMS = df

bin_PROGRAMS = chgrp chown chmod cp dd dircolors du \
ginstall ln dir vdir ls mkdir \
mkfifo mknod mv rm rmdir shred sync touch @DF_PROG@@EXEEXT@

datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale

noinst_HEADERS = \
  system.h sys2.h copy.h cp-hash.h ls.h dircolors.h remove.h \
  chown-core.h
EXTRA_DIST = dcgen dircolors.hin

INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../intl
DEFS = -DLOCALEDIR=\"$(localedir)\" -DSHAREDIR=\"$(datadir)\" @DEFS@
LDADD = @INTLLIBS@ ../lib/libfetish.a

dir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
ls_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
shred_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
vdir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@

$(bin_PROGRAMS) $(libexec_PROGRAMS): ../lib/libfetish.a

# Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid
# confusion with the `install' target.  The install rule transforms `ginstall'
# to install before applying any user-specified name transformations.

transform = s/ginstall/install/; @program_transform_name@
ginstall_SOURCES = install.c copy.c cp-hash.c djutils.c djstart.c

cp_SOURCES = cp.c copy.c cp-hash.c djutils.c djstart.c
dir_SOURCES = ls.c ls-dir.c ls-msdos.c djutils.c djstart.c
vdir_SOURCES = ls.c ls-vdir.c ls-msdos.c djutils.c djstart.c
ls_SOURCES = ls.c ls-ls.c ls-msdos.c djutils.c djstart.c
dircolors_SOURCES = dircolors.c djutils.c djstart.c
chown_SOURCES = chown.c chown-core.c djutils.c djstart.c
chgrp_SOURCES = chgrp.c chown-core.c djutils.c djstart.c
chmod_SOURCES = chmod.c djutils.c djstart.c

mv_SOURCES = mv.c copy.c cp-hash.c remove.c djutils.c djstart.c
rm_SOURCES = rm.c remove.c djutils.c djstart.c

ln_SOURCES = ln.c djutils.c djstart.c

touch_SOURCES = touch.c djutils.c djstart.c

du_SOURCES = du.c djutils.c djstart.c
df_SOURCES = df.c djutils.c djstart.c
sync_SOURCES = sync.c djutils.c djstart.c

mkdir_SOURCES = mkdir.c djutils.c djstart.c
rmdir_SOURCES = rmdir.c djutils.c djstart.c

dd_SOURCES = dd.c djutils.c djstart.c
mkfifo_SOURCES = mkfifo.c djutils.c djstart.c
mknod_SOURCES = mknod.c djutils.c djstart.c
shred_SOURCES = shred.c djutils.c djstart.c

BUILT_SOURCES = dircolors.h
PERL = @PERL@
editpl = sed -e 's,@''PERL''@,$(PERL),g'

MAINTAINERCLEANFILES = dircolors.h

dircolors.h: dcgen dircolors.hin
	$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
	mv $@-t $@
