-libexec_PROGRAMS = @RMT@
-EXTRA_PROGRAMS = rmt
-
-noinst_HEADERS = arith.h common.h rmt.h system.h tar.h
-rmt_SOURCES = rmt.c
-tar_SOURCES = arith.c buffer.c compare.c create.c delete.c extract.c \
-incremen.c list.c mangle.c misc.c names.c open3.c rtapelib.c tar.c update.c
-
-INCLUDES = -I../intl -I$(top_srcdir)/lib
-LDADD = ../lib/libtar.a @INTLLIBS@
-localedir = $(prefix)/@DATADIRNAME@/locale
-
-tar.o: tar.c
- $(COMPILE) -DLOCALEDIR=\"$(localedir)\" -c $(srcdir)/tar.c
-
-tar._o: tar._c
- @rm -f _tar.c
- @ln tar._c _tar.c
- $(COMPILE) -DLOCALEDIR=\"$(localedir)\" -c _tar.c
- @mv _tar.o $@
- @rm _tar.c
-
-rmt.o: rmt.c
- $(COMPILE) -DLOCALEDIR=\"$(localedir)\" -c $(srcdir)/rmt.c
-
-rmt._o: rmt._c
- @rm -f _rmt.c
- @ln rmt._c _rmt.c
- $(COMPILE) -DLOCALEDIR=\"$(localedir)\" -c _rmt.c
- @mv _rmt.o $@
- @rm _rmt.c
+
+noinst_HEADERS = arith.h common.h tar.h xattrs.h
+tar_SOURCES = \
+ buffer.c\
+ checkpoint.c\
+ compare.c\
+ create.c\
+ delete.c\
+ exit.c\
+ extract.c\
+ xheader.c\
+ incremen.c\
+ list.c\
+ misc.c\
+ names.c\
+ sparse.c\
+ suffix.c\
+ system.c\
+ tar.c\
+ transform.c\
+ unlink.c\
+ update.c\
+ utf8.c\
+ warning.c\
+ xattrs.c
+
+AM_CPPFLAGS = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib
+AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+
+LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
+
+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)