diff -Naurd redhat-cluster-suite-2.20070823/gfs/tests/filecon2/Makefile cluster/gfs/tests/filecon2/Makefile
--- redhat-cluster-suite-2.20070823/gfs/tests/filecon2/Makefile	2004-06-24 10:53:25.000000000 +0200
+++ cluster/gfs/tests/filecon2/Makefile	2007-08-26 09:12:07.000000000 +0200
@@ -11,21 +11,22 @@
 ###############################################################################
 ###############################################################################
 
+include ../../../make/defines.mk
 
-TARGETS=filecon2_server filecon2_client
-
-
-
-all:			$(TARGETS)
+TARGETS= filecon2_server filecon2_client
 
+CFLAGS += -O3
+CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -I../../include
 
-filecon2_server:	filecon2_server.c
-			$(CC) -O3 -Wall -o filecon2_server filecon2_server.c -I../../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+all: $(TARGETS)
 
-filecon2_client:	filecon2_client.c
-			$(CC) -O3 -Wall -o filecon2_client filecon2_client.c -I../../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+%.o: %.c
+	$(CC) $(CFLAGS) -c -o $@ $<
 
+%: %.o
+	$(CC) -o $@ $^ $(LDFLAGS)
 
 clean:
-			rm -f *.o *.s *.a *~ core .depend $(TARGETS)
+	rm -f *.o *.s *.a *~ core .depend $(TARGETS)
 
diff -Naurd redhat-cluster-suite-2.20070823/gfs/tests/Makefile cluster/gfs/tests/Makefile
--- redhat-cluster-suite-2.20070823/gfs/tests/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ cluster/gfs/tests/Makefile	2007-08-26 09:08:48.000000000 +0200
@@ -0,0 +1,19 @@
+###############################################################################
+###############################################################################
+##
+##  Copyright (C) 2007 Red Hat, Inc.  All rights reserved.
+##
+##  This copyrighted material is made available to anyone wishing to use,
+##  modify, copy, or redistribute it subject to the terms and conditions
+##  of the GNU General Public License v.2.
+##
+###############################################################################
+###############################################################################
+
+SUBDIRS=filecon2 mmdd
+
+%:
+	set -e && \
+	for i in ${SUBDIRS}; do \
+		${MAKE} -C $$i $@; \
+	done
diff -Naurd redhat-cluster-suite-2.20070823/gfs/tests/mmdd/CVS/Root cluster/gfs/tests/mmdd/CVS/Root
diff -Naurd redhat-cluster-suite-2.20070823/gfs/tests/mmdd/Makefile cluster/gfs/tests/mmdd/Makefile
--- redhat-cluster-suite-2.20070823/gfs/tests/mmdd/Makefile	2004-06-24 10:53:25.000000000 +0200
+++ cluster/gfs/tests/mmdd/Makefile	2007-08-26 09:16:20.000000000 +0200
@@ -11,19 +11,22 @@
 ###############################################################################
 ###############################################################################
 
-CC=gcc
-LD=gcc
+include ../../../make/defines.mk
 
-TARGETS=mmdd sfdd
+TARGETS= mmdd sfdd
 
-all:			$(TARGETS)
+CFLAGS += -D_GNU_SOURCE
 
+all: $(TARGETS)
 
-mmdd:			mmdd.c
-			$(CC) -Wall -O2 -o mmdd mmdd.c  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+mmdd.o: mmdd.c
+	$(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ $<
 
-sfdd:	    	    	mmdd.c
-			$(CC) -Wall -O2 -o sfdd mmdd.c  -D_GNU_SOURCE -DUSE_SENDFILE
+sfdd.o: mmdd.c
+	$(CC) $(CFLAGS) -DUSE_SENDFILE -c -o $@ $<
+
+%: %.o
+	$(CC) -o $@ $^ $(LDFLAGS)
 
 clean:
-			rm -f *.o *.s *.a *~ core .depend $(TARGETS)
+	rm -f *.o *.s *.a *~ core .depend $(TARGETS)
