All of lore.kernel.org
 help / color / mirror / Atom feed
From: adas@sourceware.org <adas@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/tool Makefile util.c
Date: 15 Jun 2006 16:40:49 -0000	[thread overview]
Message-ID: <20060615164049.18131.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	adas at sourceware.org	2006-06-15 16:40:48

Modified files:
	gfs2/tool      : Makefile util.c 

Log message:
	Edited Makefile to look more like other makefiles, dependent on objects rather than sources, etc. Removed reference to asm/page.h (for PAGE_SIZE) from util.c. Wasn't compiling on x86_64. Instead made PAGE_SIZE a #define

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- cluster/gfs2/tool/Makefile	2006/05/05 18:06:09	1.3
+++ cluster/gfs2/tool/Makefile	2006/06/15 16:40:48	1.4
@@ -11,22 +11,8 @@
 ###############################################################################
 ###############################################################################
 top_srcdir= ..
-include ${top_srcdir}/make/defines.mk
-
-TARGET= gfs2_tool
-
-SOURCE=	counters.c \
-	df.c \
-	layout.c \
-	main.c \
-	misc.c \
-	ondisk.c \
-	sb.c \
-	tune.c \
-	util.c
 
-CFLAGS+= -O2 -Wall -D_FILE_OFFSET_BITS=64 \
-	-DGFS2_RELEASE_NAME=\"${RELEASE}\"
+include ${top_srcdir}/make/defines.mk
 
 INCLUDE= -I${top_srcdir}/include -I${top_srcdir}/config -I${gfs2kincdir}
 
@@ -40,15 +26,31 @@
 INCLUDE += -I${incdir}
 endif
 
+LIBS=-L${top_srcdir}/libgfs2
+
+.PHONY: all clean copytobin distclean
+
+SOURCES= counters.c df.c layout.c main.c misc.c ondisk.c sb.c tune.c util.c
+
+OBJECTS=$(subst .c,.o,${SOURCES})
+
+TARGET= gfs2_tool
+
+CFLAGS+= -O2 -Wall -D_FILE_OFFSET_BITS=64 -DGFS2_RELEASE_NAME=\"${RELEASE}\"
+
 all: ${TARGET}
 
-gfs2_tool: ${SOURCE}
-	${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@ -L../libgfs2/ -lgfs2
+gfs2_tool: ${OBJECTS} ../libgfs2/libgfs2.a
+	$(CC) $(CFLAGS) $(LIBS) $^ -o $@ -lgfs2
+
+%.o: %.c
+	$(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
 
 copytobin: ${TARGET}
 	cp ${TARGET} ${top_srcdir}/bin
 
 clean:
-	rm -f *.o ${TARGET}
-
+	@rm -f ${TARGET} *.o *~
 
+distclean: clean
+	@rm -f *.d cscope.* *.orig *.rej
--- cluster/gfs2/tool/util.c	2006/05/05 18:06:09	1.4
+++ cluster/gfs2/tool/util.c	2006/06/15 16:40:48	1.5
@@ -27,13 +27,14 @@
 #include <libgen.h>
 #include <dirent.h>
 #include <string.h>
-#include <asm/page.h>
 
 #define __user
 #include <linux/gfs2_ondisk.h>
 
 #include "gfs2_tool.h"
 
+#define PAGE_SIZE (4096)
+
 static char sysfs_buf[PAGE_SIZE];
 
 char *__get_sysfs(char *fsname, char *filename)



             reply	other threads:[~2006-06-15 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-15 16:40 adas [this message]
2006-06-17  9:28 ` [Cluster-devel] cluster/gfs2/tool Makefile util.c Fabio Massimo Di Nitto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060615164049.18131.qmail@sourceware.org \
    --to=adas@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.