[Stgt-devel] [PATCH] Makefile auto dependencies

Alexander Nezhinsky nezhinsky
Tue Aug 28 21:21:20 CEST 2007


Oh, I'm terribly sorry, as i already see that my previous mail is broken 
again. Resending ...

On 8/27/07, FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> 
wrote: > Hmm, I stil can't apply the patch cleanly.
>
> Anyway, I applied it by hand this time.

This patch fixes a typo (+%.o: %.c) and also breaks the lines
longer than 80 chars into shorter ones.

Signed-off-by: Alexander Nezhinsky <nezhinsky at gmail.com>
---
  usr/Makefile |   11 +++++++----
  1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index f97f0da..3ac45c0 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -40,11 +40,14 @@ LIBS += -lcrypto -lpthread
  endif

  INCLUDES += -I.
-CFLAGS += -Wall -g -O2 -Wstrict-prototypes -fPIC -D_LARGEFILE64_SOURCE $(INCLUDES)
+
+CFLAGS += -D_LARGEFILE64_SOURCE
+CFLAGS += $(INCLUDES)
+CFLAGS += -g -O2 -Wall -Wstrict-prototypes -fPIC

  PROGRAMS += tgtd tgtadm
-TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o parser.o \
-		spc.o sbc.o mmc.o osd.o spt.o scc.o smc.o
+TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
+		parser.o spc.o sbc.o mmc.o osd.o spt.o scc.o smc.o

  TGTD_DEP = $(TGTD_OBJS:.o=.d)

@@ -61,7 +64,7 @@ tgtadm: tgtadm.o

  -include tgtadm.d

-+%.o: %.c
+%.o: %.c
 	$(CC) -c $(CFLAGS) $*.c -o $*.o
 	@$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c



More information about the stgt mailing list