olsr_switch: do not build unnecessarily
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 3 May 2012 09:53:17 +0000 (11:53 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 3 May 2012 09:56:58 +0000 (11:56 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/olsr_switch/Makefile

index afdbbb9..4bcaaac 100644 (file)
@@ -8,9 +8,11 @@ else
 BINNAME = olsr_switch
 endif
 
 BINNAME = olsr_switch
 endif
 
-default_target:        $(OBJS)
+default_target:        $(TOPDIR)/$(BINNAME)
+
+$(TOPDIR)/$(BINNAME):  $(OBJS)
        @echo "[LD] $@"
        @echo "[LD] $@"
-       @$(CC) $(LDFLAGS) -o $(TOPDIR)/$(BINNAME) $(OBJS) $(LIBS)
+       @$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 ohs_cmd.o: CFLAGS += -Wno-cast-qual
 
 
 ohs_cmd.o: CFLAGS += -Wno-cast-qual