Skip to contentSkip to conversation

cluster/gfs/tests filecon2/Makefile mmdd/Makef ...

Cluster-devel [email protected] 1 participant 1 message Aug 29, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-08-29 02:51:38

Modified files:
gfs/tests/filecon2: Makefile
gfs/tests/mmdd : Makefile
Added files:
gfs/tests : Makefile

Log message:
Cleanup gfs/tests/ Makefiles

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/tests/Makefile.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/tests/filecon2/Makefile.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/tests/mmdd/Makefile.diff?cvsroot=cluster&r1=1.1&r2=1.2

/cvs/cluster/cluster/gfs/tests/Makefile,v --> standard output revision 1.1

- renamed from gfs/tests/Makefile +19 -0
@@ -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
gfs/tests/filecon2/Makefile +11 -10
@@ -11,21 +11,22 @@
 ###############################################################################
 ###############################################################################
 
+include ../../../make/defines.mk
 
-TARGETS=filecon2_server filecon2_client
+TARGETS= filecon2_server filecon2_client
 
+CFLAGS += -O3
+CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -I../../include
 
+all: $(TARGETS)
 
-all:			$(TARGETS)
-
-
-filecon2_server:	filecon2_server.c
-			$(CC) -O3 -Wall -o filecon2_server filecon2_server.c -I../../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-
-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)
 
gfs/tests/mmdd/Makefile +12 -9
@@ -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)