Also select -1.0 quality vertices as best vertices.
[olsrd.git] / Makefile
index ed1bdd4..e6bdba0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 #
-# $Id: Makefile,v 1.19 2004/11/08 01:54:05 tlopatic Exp $
+# $Id: Makefile,v 1.21 2004/11/10 11:12:50 kattemat Exp $
 #
 
 #OS ?=         linux
@@ -41,6 +41,9 @@ DEPFILE =     .depend
 DEPBAK =       .depend.bak
 DEPEND =       makedepend -f $(DEPFILE)
 
+DEFINES =      -DUSE_LINK_QUALITY
+INCLUDES =     -I src
+
 all:           olsrd
 
 SRCS =         $(wildcard src/*.c) \
@@ -61,14 +64,17 @@ HDRS +=             $(wildcard src/linux/*.h) $(wildcard src/unix/*.h)
 OBJS +=                $(patsubst %.c,%.o,$(wildcard src/linux/*.c)) \
                $(patsubst %.c,%.o,$(wildcard src/unix/*.c))
 
-CFLAGS ?=      -Isrc -Wall -Wmissing-prototypes -Wstrict-prototypes \
-               -O2 -g -Dlinux #-pg -DDEBUG #-march=i686
+DEFINES +=     -Dlinux
+
+CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
+               -O2 -g #-pg -DDEBUG #-march=i686
 
 LIBS =         -lpthread -lm -ldl
 
+
 $(DEPFILE):    $(SRCS) $(HDRS)
                @echo '# olsrd dependency file. AUTOGENERATED' > $(DEPFILE)
-               $(DEPEND) -Y $(CFLAGS) $(SRCS) >/dev/null 2>&1
+               $(DEPEND) -Y $(INCLUDES) $(DEFINES) $(SRCS) >/dev/null 2>&1
 
 olsrd:         $(OBJS)
                $(CC) -o bin/$@ $(OBJS) $(LIBS)
@@ -83,14 +89,14 @@ HDRS +=             $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
 OBJS +=                $(patsubst %.c,%.o,$(wildcard src/bsd/*.c)) \
                $(patsubst %.c,%.o,$(wildcard src/unix/*.c))
 
-CFLAGS ?=      -Isrc -Wall -Wmissing-prototypes -Wstrict-prototypes \
+CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
                -O2 -g
 
 LIBS =         -pthread -lm
 
 $(DEPFILE):    $(SRCS) $(HDRS)
                @echo '# olsrd dependency file. AUTOGENERATED' > $(DEPFILE)
-               $(DEPEND) $(CFLAGS) $(SRCS)
+               $(DEPEND) $(INCLUDES) $(DEFINES) $(SRCS)
 
 olsrd:         $(OBJS)
                $(CC) -o bin/$@ $(OBJS) $(LIBS)
@@ -104,14 +110,18 @@ HDRS +=           $(wildcard src/win32/*.h)
 
 OBJS +=                $(patsubst %.c,%.o,$(wildcard src/win32/*.c))
 
-CFLAGS ?=      -Isrc -Isrc/win32 -Wall -Wmissing-prototypes \
-               -Wstrict-prototypes -mno-cygwin -O2 -g -DWIN32
+INCLUDES +=    -Isrc/win32
+
+DEFINES +=     -DWIN32
+
+CFLAGS ?=      -Wall -Wmissing-prototypes \
+               -Wstrict-prototypes -mno-cygwin -O2 -g
 
 LIBS =         -mno-cygwin -lws2_32 -liphlpapi
 
 $(DEPFILE):    $(SRCS) $(HDRS)
                @echo '# olsrd dependency file. AUTOGENERATED' > $(DEPFILE)
-               $(DEPEND) $(CFLAGS) $(SRCS) >/dev/null 2>&1
+               $(DEPEND) $(INCLUDES) $(DEFINES) $(SRCS) >/dev/null 2>&1
 
 olsrd:         $(OBJS)
                $(CC) -o bin/$@ $(OBJS) $(LIBS)
@@ -126,19 +136,19 @@ HDRS +=           $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
 OBJS +=                $(patsubst %.c,%.o,$(wildcard src/bsd/*.c)) \
                $(patsubst %.c,%.o,$(wildcard src/unix/*.c))
 
-CFLAGS ?=      -D__MacOSX__ -Isrc -Wall -Wmissing-prototypes \
-               -Wstrict-prototypes -O2 -g 
+DEFINES +=     -D__MacOSX__
+
+CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -g 
 
 LIBS =         -lm -ldl
 
 $(DEPFILE):    $(SRCS) $(HDRS)
                @echo '# olsrd dependency file. AUTOGENERATED' > $(DEPFILE)
-               $(DEPEND) $(CFLAGS) $(SRCS)
+               $(DEPEND) $(INCLUDES) $(DEFINES) $(SRCS)
 
 olsrd:         $(OBJS)
                $(CC) -o bin/$@ $(OBJS) $(LIBS)
 
-
 else
 
 olsrd:
@@ -165,6 +175,9 @@ endif
 endif
 endif
 
+override CFLAGS += $(INCLUDES) $(DEFINES)
+export CFLAGS
+
 depend:                $(DEPFILE)
 
 $(CFGDIR)/oparse.c: \