From: Jan Blunck <jblunck@suse.de>
To: linux-btrace@vger.kernel.org
Subject: [PATCH] Makefile fixes
Date: Sun, 26 Aug 2007 14:57:48 +0000 [thread overview]
Message-ID: <20070826145748.GU546@hasse.suse.de> (raw)
Here is a patch with small fixes to the Makefiles which I use in the
openSUSE blktrace package.
Signed-off-by: Jan Blunck <jblunck@suse.de>
---
Makefile | 12 ++++++------
btt/Makefile | 29 ++++++++++++++---------------
2 files changed, 20 insertions(+), 21 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -65,12 +65,12 @@ clean: docsclean
$(MAKE) -C btt clean
install: all
- $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
- $(INSTALL) -m755 -d $(DESTDIR)$(mandir)/man1
- $(INSTALL) -m755 -d $(DESTDIR)$(mandir)/man8
- $(INSTALL) $(ALL) $(DESTDIR)$(bindir)
- $(INSTALL) doc/*.1 $(DESTDIR)$(mandir)/man1
- $(INSTALL) doc/*.8 $(DESTDIR)$(mandir)/man8
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
+ $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8
ifneq ($(wildcard .depend),)
include .depend
--- a/btt/Makefile
+++ b/btt/Makefile
@@ -6,41 +6,40 @@
#
CC = gcc
+CFLAGS = -Wall -W -O2 -g
INCS = -I. -I..
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
-XCFLAGS = -Wall -W -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITSd
-CFLAGS = $(INCS) -O2 $(XCFLAGS) $(OCFLAGS)
+XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITSd
+override CFLAGS += $(INCS) $(XCFLAGS) $(OCFLAGS)
PROGS = btt
LIBS = $(PLIBS) $(ELIBS)
OBJS = args.o bt_timeline.o devmap.o devs.o dip_rb.o iostat.o latency.o \
misc.o output.o proc.o seek.o trace.o trace_complete.o trace_im.o \
- trace_issue.o trace_queue.o trace_remap.o trace_requeue.o rbtree.o \
- mmap.o trace_plug.o bno_dump.o unplug_hist.o
+ trace_issue.o trace_queue.o trace_remap.o trace_requeue.o \
+ ../rbtree.o mmap.o trace_plug.o bno_dump.o unplug_hist.o
all: depend $(PROGS)
-rbtree.o: ../rbtree.c
- $(CC) -o $*.o -c $(CFLAGS) $<
+.PHONY : depend
+depend: $(patsubst %.o,%.c,$(filter %.o,$(OBJS)))
+ @$(CC) -MM $(CFLAGS) -I.. $^ 1> .depend
-depend:
- @$(CC) -MM $(CFLAGS) -I.. *.c 1> .depend
+docs:
+ $(MAKE) -C doc all
+
+docsclean:
+ $(MAKE) -C doc clean
clean: docsclean
-rm -f *.o $(PROGS) .depend
%.o: %.c
- $(CC) -o $*.o -c $(CFLAGS) $<
+ $(CC) $(CFLAGS) -c -o $*.o $<
btt: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
-docs:
- $(MAKE) -C doc all
-
-docsclean:
- $(MAKE) -C doc clean
-
ifneq ($(wildcard .depend),)
include .depend
endif
next reply other threads:[~2007-08-26 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-26 14:57 Jan Blunck [this message]
2007-08-26 17:39 ` [PATCH] Makefile fixes Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2001-02-28 22:26 Kai Germaschewski
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=20070826145748.GU546@hasse.suse.de \
--to=jblunck@suse.de \
--cc=linux-btrace@vger.kernel.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.