Index: configure.ac
===================================================================
RCS file: /cvsroot/ltp/ltp/configure.ac,v
retrieving revision 1.13
diff -u -r1.13 configure.ac
--- configure.ac	25 May 2009 15:01:45 -0000	1.13
+++ configure.ac	7 Jul 2009 01:15:48 -0000
@@ -2,7 +2,8 @@
 AC_INIT([ltp], [cvs], [ltp-results@lists.sourceforge.net])
 AM_INIT_AUTOMAKE([1.10])
 AC_CONFIG_HEADERS([include/config.h])
-AC_CONFIG_FILES([config.mk m4/Makefile])
+AC_CONFIG_FILES([ include/mk/config.mk lib/ltp.pc ltp-devel.spec m4/Makefile \
+README.ltp-devel ])
 
 AC_CANONICAL_HOST
 AC_PROG_CC
@@ -11,6 +12,7 @@
 
 AC_CHECK_HEADERS_ONCE([ \
 ifaddrs.h \
+libaio.h \
 sys/capability.h \
 sys/inotify.h \
 ])
Index: config.mk.in
===================================================================
RCS file: config.mk.in
diff -N config.mk.in
--- config.mk.in	31 Mar 2009 13:58:13 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-CC = @CC@
-AR = @AR@
-RANLIB = @RANLIB@
-
-CPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-AIO_LIBS = @AIO_LIBS@
-SELINUX_LIBS = @SELINUX_LIBS@
-CRYPTO_LIB = @CRYPTO_LIB@
Index: ltp-devel.spec.in
===================================================================
RCS file: ltp-devel.spec.in
diff -N ltp-devel.spec.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ltp-devel.spec.in	7 Jul 2009 01:15:48 -0000
@@ -0,0 +1,68 @@
+#
+# RPM Package Manager (RPM) spec file for ltp-devel
+#
+Summary: Linux Test Project (LTP) Software Development Kit (SDK)
+Name: ltp-devel
+Version: 2.0
+Release: 0.0
+Prefix: @prefix@
+License: GPL
+Group: Development/Libraries
+URL: http://www.linuxtestproject.org
+Vendor: IBM Corp
+Packager: Subrata Modak <subrata.modak@@in.ibm.com>
+AutoReqProv:    0
+Provides:       LTP
+#ExclusiveArch:  i386
+ExclusiveOS:    linux
+%description
+This is a development package of the Linux Test Project (LTP).
+It is intended to be used to build testcases using the provided API.
+%files
+@prefix@/lib/libltp.a
+@datarootdir@/pkgconfig/ltp.pc
+@prefix@/bin/ltp-pan
+@prefix@/bin/ltp-scanner
+@prefix@/bin/ltp-bump
+@prefix@/include/linux_syscall_numbers.h
+@prefix@/include/libtestsuite.h
+@prefix@/include/usctest.h
+@prefix@/include/string_to_tokens.h
+@prefix@/include/str_to_bytes.h
+@prefix@/include/databin.h
+@prefix@/include/open_flags.h
+@prefix@/include/write_log.h
+@prefix@/include/dataascii.h
+@prefix@/include/forker.h
+@prefix@/include/compiler.h
+@prefix@/include/test.h
+@prefix@/include/tlibio.h
+@prefix@/include/pattern.h
+@prefix@/include/file_lock.h
+@prefix@/include/random_range.h
+@prefix@/include/search_path.h
+@prefix@/include/rmobj.h
+@mandir@/man3/tst_tmpdir.3
+@mandir@/man3/random_range_seed.3
+@mandir@/man3/pattern.3
+@mandir@/man3/parse_ranges.3
+@mandir@/man3/usctest.3
+@mandir@/man3/random_range.3
+@mandir@/man3/forker.3
+@mandir@/man3/rmobj.3
+@mandir@/man3/parse_open_flags.3
+@mandir@/man3/tst_res.3
+@mandir@/man3/write_log.3
+@mandir@/man3/str_to_bytes.3
+@mandir@/man3/tst_set_error.3
+@mandir@/man3/parse_opts.3
+@mandir@/man3/string_to_tokens.3
+@mandir@/man3/tst_sig.3
+@mandir@/man3/get_attrib.3
+@mandir@/man1/ltp-pan.1
+@mandir@/man1/doio.1
+@mandir@/man1/iogen.1
+@mandir@/man1/ltp-bump.1
+# Post-install stuff would go here.
+#EOF
+
Index: ltp-devel.spec
===================================================================
RCS file: ltp-devel.spec
diff -N ltp-devel.spec
--- ltp-devel.spec	19 May 2009 09:39:11 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,68 +0,0 @@
-#
-# RPM Package Manager (RPM) spec file for ltp-devel
-#
-Summary: Linux Test Project (LTP) Software Development Kit (SDK)
-Name: ltp-devel
-Version: 2.0
-Release: 0.0
-Prefix: /opt/ltp
-License: GPL
-Group: Development/Libraries
-URL: http://www.linuxtestproject.org
-Vendor: IBM Corp
-Packager: Subrata Modak <subrata.modak@@in.ibm.com>
-AutoReqProv:    0
-Provides:       LTP
-#ExclusiveArch:  i386
-ExclusiveOS:    linux
-%description
-This is a development package of the Linux Test Project (LTP).
-It is intended to be used to build testcases using the provided API.
-%files
-/opt/ltp/lib/libltp.a
-/usr/share/pkgconfig/ltp.pc
-/opt/ltp/bin/ltp-pan
-/opt/ltp/bin/ltp-scanner
-/opt/ltp/bin/ltp-bump
-/opt/ltp/include/linux_syscall_numbers.h
-/opt/ltp/include/libtestsuite.h
-/opt/ltp/include/usctest.h
-/opt/ltp/include/string_to_tokens.h
-/opt/ltp/include/str_to_bytes.h
-/opt/ltp/include/databin.h
-/opt/ltp/include/open_flags.h
-/opt/ltp/include/write_log.h
-/opt/ltp/include/dataascii.h
-/opt/ltp/include/forker.h
-/opt/ltp/include/compiler.h
-/opt/ltp/include/test.h
-/opt/ltp/include/tlibio.h
-/opt/ltp/include/pattern.h
-/opt/ltp/include/file_lock.h
-/opt/ltp/include/random_range.h
-/opt/ltp/include/search_path.h
-/opt/ltp/include/rmobj.h
-/usr/share/man/man3/tst_tmpdir.3
-/usr/share/man/man3/random_range_seed.3
-/usr/share/man/man3/pattern.3
-/usr/share/man/man3/parse_ranges.3
-/usr/share/man/man3/usctest.3
-/usr/share/man/man3/random_range.3
-/usr/share/man/man3/forker.3
-/usr/share/man/man3/rmobj.3
-/usr/share/man/man3/parse_open_flags.3
-/usr/share/man/man3/tst_res.3
-/usr/share/man/man3/write_log.3
-/usr/share/man/man3/str_to_bytes.3
-/usr/share/man/man3/tst_set_error.3
-/usr/share/man/man3/parse_opts.3
-/usr/share/man/man3/string_to_tokens.3
-/usr/share/man/man3/tst_sig.3
-/usr/share/man/man3/get_attrib.3
-/usr/share/man/man1/ltp-pan.1
-/usr/share/man/man1/doio.1
-/usr/share/man/man1/iogen.1
-/usr/share/man/man1/ltp-bump.1
-# Post-install stuff would go here.
-#EOF
-
Index: README.ltp-devel
===================================================================
RCS file: README.ltp-devel
diff -N README.ltp-devel
--- README.ltp-devel	29 May 2009 10:06:08 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-This is a README to describe the ltp-devel.patch functional changes.
-
-"make install" is to build and install:
-
-	/opt/ltp/bin/ltp-bump
-	/opt/ltp/bin/ltp-pan
-	/opt/ltp/bin/ltp-scanner
-	/opt/ltp/lib/libltp.a
-	/usr/share/pkgconfig/ltp.pc
-	/opt/ltp/include/
-	/usr/share/man/
-
-"make package" is to rpm package what was installed above:
-
-	/usr/src/redhat/RPMS/i386/ltp-devel-1.0-0.0.i386.rpm
-
-For someone wanting to write a standalone test that uses "libltp.a", then
-their Makefile would compile their test program like this:
-
-	test: test.c
-		cc test.c `pkg-config --cflags --libs ltp`
-
-To read manual pages, then the developer would type:
-(Most Important man pages)
-
-	man usctest
-	man ltp-pan
-	man tst_res
-	man tst_sig
-	man tst_set_error
-	man tst_tmpdir
-	man parse_opts
-
-(Others)
-	man ltp-bump
-	man doio
-	man iogen
-	man forker
-	man pattern
-	man random_range_seed
-	man string_to_tokens
-	man get_attrib
-	man parse_open_flags
-	man parse_ranges
-	man random_range
-	man rmobj
-	man str_to_bytes
-	man write_log
Index: README.ltp-devel.in
===================================================================
RCS file: README.ltp-devel.in
diff -N README.ltp-devel.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ README.ltp-devel.in	7 Jul 2009 01:15:48 -0000
@@ -0,0 +1,48 @@
+This is a README to describe the ltp-devel.patch functional changes.
+
+"make install" is to build and install:
+
+	@prefix@/bin/ltp-bump
+	@prefix@/bin/ltp-pan
+	@prefix@/bin/ltp-scanner
+	@prefix@/lib/libltp.a
+	@datarootdir@/pkgconfig/ltp.pc
+	@prefix@/include/
+	@mandir@
+
+"make package" is to rpm package what was installed above:
+
+	/usr/src/redhat/RPMS/i386/ltp-devel-1.0-0.0.i386.rpm
+
+For someone wanting to write a standalone test that uses "libltp.a", then
+their Makefile would compile their test program like this:
+
+	test: test.c
+		cc test.c `pkg-config --cflags --libs ltp`
+
+To read manual pages, then the developer would type:
+(Most Important man pages)
+
+	man usctest
+	man ltp-pan
+	man tst_res
+	man tst_sig
+	man tst_set_error
+	man tst_tmpdir
+	man parse_opts
+
+(Others)
+	man ltp-bump
+	man doio
+	man iogen
+	man forker
+	man pattern
+	man random_range_seed
+	man string_to_tokens
+	man get_attrib
+	man parse_open_flags
+	man parse_ranges
+	man random_range
+	man rmobj
+	man str_to_bytes
+	man write_log
Index: include/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/include/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- include/Makefile	23 Jun 2009 14:18:16 -0000	1.7
+++ include/Makefile	7 Jul 2009 01:15:48 -0000
@@ -1,27 +1,53 @@
+#
+#    include Makefile.
+#
+#    Copyright (C) 2009, Cisco Systems Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+# Copyright (c) 2009 by Cisco Systems, Inc.
+# All rights reserved
+#
+
+srcdir			?= ..
+
+include $(srcdir)/include/mk/master_include.mk
+
+CLEAN_DEPS		:= ac-clean
+
+INSTALL_DIR		:= $(patsubst %/$(prefix),%,$(includedir))/ltp
+
+INSTALL_MODE		:= 00644
+
+INSTALL_TARGETS		:= compiler.h dataascii.h databin.h file_lock.h \
+			   forker.h open_flags.h pattern.h random_range.h \
+			   rmobj.h search_path.h string_to_tokens.h \
+			   str_to_bytes.h test.h tlibio.h usctest.h \
+			   write_log.h linux_syscall_numbers.h libtestsuite.h
 
+MAKE_TARGETS		:=
 
-PREFIX=/opt/ltp
-HEADERS=compiler.h dataascii.h databin.h file_lock.h forker.h open_flags.h \
-	pattern.h random_range.h rmobj.h search_path.h string_to_tokens.h \
-	str_to_bytes.h test.h tlibio.h usctest.h write_log.h \
-	linux_syscall_numbers.h libtestsuite.h config.h
-
-.PHONY: all install
-all:
-
-install: $(HEADERS)
-	@set -e; for i in $(HEADERS); do \
-		install -D -m 644 $$i $(DESTDIR)/$(PREFIX)/include/ltp/$$i; \
-	done
-
-.PHONY: clean distclean maintainer-clean
-clean: ac-clean
+.PHONY: ac-clean ac-distclean ac-maintainer-clean distclean maintainer-clean
 distclean: clean ac-distclean
 maintainer-clean: distclean ac-maintainer-clean
-
-.PHONY: ac-clean ac-distclean ac-maintainerclean
 ac-clean:
 ac-distclean:
-	rm -f config.h
+	$(RM) -f config.h
 ac-maintainer-clean:
-	rm -f config.h.in
+	$(RM) -f config.h.in
+
+$(eval $(generic_leaf_target))
Index: include/mk/config.mk.in
===================================================================
RCS file: include/mk/config.mk.in
diff -N include/mk/config.mk.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ include/mk/config.mk.in	7 Jul 2009 01:15:48 -0000
@@ -0,0 +1,61 @@
+#
+#    config.mk.in.
+#
+#    Copyright (C) 2009, Cisco Systems Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+# Copyright (c) 2009 by Cisco Systems, Inc.
+# All rights reserved
+#
+
+AR		= @AR@
+CC		= @CC@
+RANLIB		= @RANLIB@
+
+# Avoid overwriting definitions in leaf callers.
+CPPFLAGS	?= @CPPFLAGS@
+CFLAGS		?= @CFLAGS@
+LDLIBS		?= @LIBS@
+LDFLAGS		?= @LDFLAGS@
+
+AIO_LIBS	= @AIO_LIBS@
+CRYPTO_LIB	= @CRYPTO_LIB@
+SELINUX_LIBS	= @SELINUX_LIBS@
+
+RPMBUILD	?= rpmbuild
+
+prefix		?= @prefix@
+
+#
+# Default to /opt/ltp if the directory specified was a zero-length string, to
+# avoid spurious Make system errors.
+#
+# XXX (garrcoop): I'm almost positive there's a better way to do this in
+# autoconf. Haven't figured it out yet...
+#
+ifeq ($(strip $(prefix)),)
+prefix		= /opt/ltp
+endif
+
+datarootdir	= @datarootdir@
+includedir	= @includedir@
+mandir		= @mandir@
+
+#export AR CC CFLAGS CPPFLAGS LDLIBS LDFLAGS RANLIB
+export AR CC CPPFLAGS LDLIBS LDFLAGS RANLIB
+export datarootdir includedir mandir prefix
Index: lib/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- lib/Makefile	3 Apr 2009 06:58:18 -0000	1.16
+++ lib/Makefile	7 Jul 2009 01:15:48 -0000
@@ -1,26 +1,66 @@
+#
+#    lib Makefile.
+#
+#    Copyright (C) 2009, Cisco Systems Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+# Copyright (c) 2009 by Cisco Systems, Inc.
+# All rights reserved
+#
 
-PREFIX=/opt/ltp
+srcdir			?= ..
 
-CFLAGS+= -Wall
-CPPFLAGS+= -I../include 
+include $(srcdir)/include/mk/master_include.mk
+
+CFLAGS			+= -Wall
+CPPFLAGS		+= -I$(srcdir)/include 
 ifeq ($(shell uname -s),HP-UX)
-CFLAGS+=-Ae -D_LARGEFILE64_SOURCE +DA1.1
+CFLAGS			+=-Ae -D_LARGEFILE64_SOURCE +DA1.1
 endif
 ifeq ($(UCLINUX),1)
-CFLAGS+= -D_USC_LIB_ -D__UCLIBC__ -DUCLINUX
+CFLAGS			+= -D_USC_LIB_ -D__UCLIBC__ -DUCLINUX
 endif
-LDFLAGS+=
-TARGET=libltp.a
-SRCS=$(wildcard *.c)
-OBJS=$(patsubst %.c,%.o,$(SRCS))
-
-$(TARGET): $(OBJS)
-	$(AR) -cr $@ $^
-
-clean:
-	rm -f $(TARGET) $(OBJS)
-
-install: $(TARGET)
-	install -D -m 644 $(TARGET) $(DESTDIR)/$(PREFIX)/lib$(LIBSUFFIX)/$(TARGET)
-	install -D -m 644 ltp.pc $(DESTDIR)/$(PREFIX)/share/pkgconfig/ltp.pc
 
+INSTALL_DIR		:= lib$(LIBSUFFIX)
+
+LIB			:= $(DESTDIR)/$(prefix)/$(INSTALL_DIR)/libltp.a
+
+OBJS			:= $(patsubst %.c,%.o,$(notdir $(wildcard $(srcdir)/$(relpath)/*.c)))
+
+$(LIB): $(addprefix $(objdir)/$(relpath)/,$(OBJS))
+
+# Replace all leading instances of $(prefix) in $(datarootdir), because
+# $(INSTALL_DIR) needs to be relative to $(prefix) in order to function
+# properly.
+pc_INSTALL_DIR		:= $(patsubst $(prefix)%,%,$(datarootdir))/pkgconfig
+
+pc_file			:= $(DESTDIR)/$(prefix)/$(pc_INSTALL_DIR)/ltp.pc
+
+CLEAN_TARGETS		:= $(OBJS) $(pc_file)
+
+INSTALL_MODE		:= 00644
+
+MAKE_TARGETS		:= $(LIB)
+
+$(dir $(pc_file)):
+	mkdir -p $@
+
+$(pc_file): $(dir $@)
+	install -m $(INSTALL_MODE) $^ $@
+
+$(eval $(generic_leaf_target))
Index: lib/ltp.pc
===================================================================
RCS file: lib/ltp.pc
diff -N lib/ltp.pc
--- lib/ltp.pc	2 Apr 2008 09:24:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-prefix=/opt/ltp
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: LTP
-Description: Linux Test Project
-Version: 1.0
-Libs: -L${libdir} -lltp
-Cflags: -I${includedir}
-Libs.private: -L${libdir} -lltp 
Index: lib/ltp.pc.in
===================================================================
RCS file: lib/ltp.pc.in
diff -N lib/ltp.pc.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ lib/ltp.pc.in	7 Jul 2009 01:15:48 -0000
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+Name: LTP
+Description: Linux Test Project
+Version: 1.0
+Libs: -L${libdir} -lltp
+Cflags: -I${includedir}
+Libs.private: -L${libdir} -lltp 
Index: m4/GNUmakefile
===================================================================
RCS file: /cvsroot/ltp/ltp/m4/GNUmakefile,v
retrieving revision 1.1
diff -u -r1.1 GNUmakefile
--- m4/GNUmakefile	18 Jan 2009 22:22:40 -0000	1.1
+++ m4/GNUmakefile	7 Jul 2009 01:15:48 -0000
@@ -1,12 +1,40 @@
+#
+#    m4 Makefile.
+#
+#    Copyright (C) 2009, Cisco Systems Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+# Copyright (c) 2009 by Cisco Systems, Inc.
+# All rights reserved
+#
 
+srcdir			?= ..
 
-PREFIX=/opt/ltp
-M4MACROS=$(notdir $(wildcard *.m4))
+include $(srcdir)/include/mk/master_include.mk
 
-all:
+M4MACROS		:= $(notdir $(wildcard *.m4))
 
-install: $(M4MACROS)
-	for i in $(M4MACROS); do \
-		install -D -m 644 $$i $(DESTDIR)/$(PREFIX)/share/aclocal/$$i; \
-	done
+INSTALL_DIR		:= $(patsubst $(prefix)%,%,$(datarootdir))/aclocal
 
+INSTALL_MODE		:= 00644
+
+INSTALL_TARGETS		:= $(M4_MACROS)
+
+MAKE_TARGETS		:=
+
+$(eval $(generic_leaf_target))
Index: pan/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/pan/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- pan/Makefile	19 May 2009 09:39:11 -0000	1.19
+++ pan/Makefile	7 Jul 2009 01:15:48 -0000
@@ -1,24 +1,46 @@
+#
+#    pan Makefile.
+#
+#    Copyright (C) 2009, Cisco Systems Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Garrett Cooper, July 2009
+#
+# Copyright (c) 2009 by Cisco Systems, Inc.
+# All rights reserved
+#
+
+srcdir			?= ..
+
+include $(srcdir)/include/mk/master_include.mk
+
+LDLIBS			+= -lm
+LFLAGS			+= -l -w
+CFLAGS			+= -w 
 
-LOADLIBES += -lm
-LFLAGS += -l -w
-CFLAGS += -w 
-PREFIX = /opt/ltp
+CLEAN_TARGETS		:= *.o
 
-all: ltp-pan ltp-bump ltp-scanner
-
-ltp-pan: ltp-pan.o zoolib.o splitstr.o
+INSTALL_DIR		:= testcases/bin
 
+MAKE_TARGETS		:= ltp-bump ltp-pan ltp-scanner
 
 ltp-bump: ltp-bump.o zoolib.o
 
+ltp-pan: ltp-pan.o zoolib.o splitstr.o
 
 ltp-scanner: scan.o ltp-scanner.o reporter.o tag_report.o symbol.o splitstr.o debug.o
 
-
-install: ltp-pan ltp-bump ltp-scanner
-	install -D ltp-scanner $(DESTDIR)/$(PREFIX)/bin/ltp-scanner
-	install -D ltp-pan $(DESTDIR)/$(PREFIX)/bin/ltp-pan
-	install -D ltp-bump $(DESTDIR)/$(PREFIX)/bin/ltp-bump
-
-clean:
-	rm -f *.o ltp-pan ltp-bump ltp-scanner
+$(eval $(generic_leaf_target))
