From patchwork Tue Nov 25 22:39:50 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5362 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (8.13.4/8.13.4/Debian-3sarge3) with SMTP id mAPMjVvr028622 for ; Tue, 25 Nov 2008 23:45:32 +0100 Received: (qmail invoked by alias); 25 Nov 2008 22:39:50 -0000 Received: from unknown (EHLO localhost) [89.246.194.200] by mail.gmx.net (mp036) with SMTP; 25 Nov 2008 23:39:50 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX19lBxpVjWZl7zP3fAqBgmkCU+f8tpktNrmrbeRdRP fjnJr6Nd/YrnWf From: Sven Eckelmann To: b.a.t.m.a.n@open-mesh.net Date: Tue, 25 Nov 2008 23:39:50 +0100 Message-Id: <1227652790-9362-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.6.0.4 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46 Subject: [B.A.T.M.A.N.] [PATCH] Compile object files before linking vis-advanced X-BeenThere: b.a.t.m.a.n@open-mesh.net X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 22:45:32 -0000 Signed-off-by: Sven Eckelmann --- vis-advanced/Makefile | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/vis-advanced/Makefile b/vis-advanced/Makefile index 9448fd9..548d85f 100644 --- a/vis-advanced/Makefile +++ b/vis-advanced/Makefile @@ -16,6 +16,15 @@ # 02110-1301, USA # +ifneq ($(findstring $(MAKEFLAGS),s),s) +ifndef V + Q_CC = @echo ' ' CC $@; + Q_LD = @echo ' ' LD $@; + export Q_CC + export Q_LD +endif +endif + CC = gcc CFLAGS = -Wall -W -O0 -g3 -DDEBUG_MALLOC -DMEMORY_USAGE LDFLAGS = -lpthread @@ -24,13 +33,20 @@ LDFLAGS_STATIC = -lpthread -static SRC_C= allocate.c hash.c list-batman.c vis.c udp_server.c SRC_H= allocate.h hash.h list-batman.h vis.h vis-types.h +SRC_O= $(SRC_C:.c=.o) + + +vis-adv: $(SRC_O) Makefile + $(Q_LD)$(CC) $(CFLAGS) -o $@ $(SRC_O) $(LDFLAGS) +vis-adv-static: $(SRC_O) Makefile + $(Q_LD)$(CC) $(CFLAGS) -o $@ $(SRC_O) $(LDFLAGS_STATIC) -vis-adv: $(SRC_C) $(SRC_H) Makefile - $(CC) $(CFLAGS) -o $@ $(SRC_C) $(LDFLAGS) +%.o: %.c %.h + $(Q_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ -vis-adv-static: $(SRC_C) $(SRC_H) Makefile - $(CC) $(CFLAGS) -o $@ $(SRC_C) $(LDFLAGS_STATIC) +%.o: %.c + $(Q_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ clean: rm -f vis-adv vis-adv-static *.o *~