* distribute information about (upstream) DNS servers
[olsrd.git] / Makefile
index d3df4b6..84f4c76 100644 (file)
--- a/Makefile
+++ b/Makefile
 # to the project. For more information see the website or contact
 # the copyright holders.
 #
-# $Id: Makefile,v 1.46 2005/02/27 10:43:15 kattemat Exp $
+# $Id: Makefile,v 1.51 2005/03/10 06:55:44 kattemat Exp $
 
-VERS =         0.4.8
+VERS =         0.4.9
 
 CC ?=          gcc
 STRIP ?=       strip
 BISON ?=       bison
 FLEX ?=                flex
 
+CCWARNINGS = -Wall -Wmissing-prototypes -Wstrict-prototypes \
+             -Wmissing-declarations -Wsign-compare
+
 INSTALL_PREFIX ?=
 
 INCLUDES =     -Isrc
@@ -75,8 +78,7 @@ ifeq ($(OS), linux)
 SRCS +=        $(wildcard src/linux/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/linux/*.h) $(wildcard src/unix/*.h)
 DEFINES =      -Dlinux
-CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
-               -O2 -g #-DDEBUG #-pg #-march=i686
+CFLAGS ?=      $(CCWARNINGS) -O2 -g #-DDEBUG #-pg #-march=i686
 LIBS =         -lm -ldl #-pg
 MAKEDEPEND =   makedepend -f $(DEPFILE) $(DEFINES) -Y $(INCLUDES) $(SRCS) >/dev/null 2>&1
 
@@ -85,16 +87,25 @@ ifeq ($(OS), fbsd)
 
 SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
-CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -g
+CFLAGS ?=      $(CCWARNINGS) -O2 -g
 LIBS =         -lm
 MAKEDEPEND =   makedepend -f $(DEPFILE) -D__FreeBSD__ $(INCLUDES) $(SRCS)
 
+else
+ifeq ($(OS), fbsd-ll)
+
+SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
+HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
+CFLAGS ?=      -Wall -Wmissing-prototypes -O2 -g -DSPOOF -I/usr/local/include
+LIBS =         -lm -L/usr/local/lib -lnet
+MAKEDEPEND =   makedepend -f $(DEPFILE) -D__FreeBSD__ $(INCLUDES) $(SRCS)
+
 else
 ifeq ($(OS), nbsd)
 
 SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
-CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -g
+CFLAGS ?=      $(CCWARNINGS) -O2 -g
 LIBS =         -lm
 MAKEDEPEND =   makedepend -f $(DEPFILE) -D__NetBSD__ $(INCLUDES) $(SRCS)
 
@@ -104,7 +115,7 @@ ifeq ($(OS), osx)
 SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
 DEFINES =      -D__MacOSX__
-CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -g 
+CFLAGS ?=      $(CCWARNINGS) -O2 -g 
 LIBS =         -lm -ldl
 MAKEDEPEND =   makedepend -f $(DEPFILE) $(DEFINES) $(INCLUDES) $(SRCS)
 
@@ -115,8 +126,7 @@ SRCS +=             $(wildcard src/win32/*.c)
 HDRS +=                $(wildcard src/win32/*.h)
 INCLUDES +=    -Isrc/win32
 DEFINES =      -DWIN32
-CFLAGS ?=      -Wall -Wmissing-prototypes -Wstrict-prototypes \
-               -mno-cygwin -O2 -g
+CFLAGS ?=      $(CCWARNINGS) -mno-cygwin -O2 -g
 LIBS =         -mno-cygwin -lws2_32 -liphlpapi
 MAKEDEPEND =   makedepend -f $(DEPFILE) $(DEFINES) $(INCLUDES) $(SRCS)
 
@@ -129,10 +139,14 @@ olsr-${VERS}.zip: gui/win32/Main/Release/Switch.exe \
                gui/win32/Inst/linux-manual.txt \
                files/olsrd.conf.default.win32 \
                gui/win32/Main/Default.olsr \
-               lib/dot_draw/olsrd_dot_draw.dll
+               lib/dot_draw/olsrd_dot_draw.dll \
+               lib/nameservice/olsrd_nameservice.dll \
+               lib/httpinfo/olsrd_httpinfo.dll
                $(STRIP) olsrd.exe
                $(STRIP) src/cfgparser/olsrd_cfgparser.dll
                $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
+               $(STRIP) lib/nameservice/olsrd_nameservice.dll
+               $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
                rm -rf ${TEMP}/olsr-${VERS}
                rm -f ${TEMP}/olsr-${VERS}.zip
                rm -f olsr-${VERS}.zip
@@ -147,6 +161,8 @@ olsr-${VERS}.zip:   gui/win32/Main/Release/Switch.exe \
                cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/olsrd.conf
                cp gui/win32/Main/Default.olsr ${TEMP}/olsr-${VERS}
                cp lib/dot_draw/olsrd_dot_draw.dll ${TEMP}/olsr-${VERS}
+               cp lib/nameservice/olsrd_nameservice.dll ${TEMP}/olsr-${VERS}
+               cp lib/httpinfo/olsrd_httpinfo.dll ${TEMP}/olsr-${VERS}
                cd ${TEMP}; echo y | cacls olsr-${VERS} /T /G Everyone:F
                cd ${TEMP}; zip -q -r olsr-${VERS}.zip olsr-${VERS}
                cp ${TEMP}/olsr-${VERS}.zip .
@@ -163,10 +179,14 @@ olsr-${VERS}-setup.exe:   gui/win32/Main/Release/Switch.exe \
                files/olsrd.conf.default.win32 \
                gui/win32/Main/Default.olsr \
                lib/dot_draw/olsrd_dot_draw.dll \
+               lib/nameservice/olsrd_nameservice.dll \
+               lib/httpinfo/olsrd_httpinfo.dll \
                gui/win32/Inst/installer.nsi
                $(STRIP) olsrd.exe
                $(STRIP) src/cfgparser/olsrd_cfgparser.dll
                $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
+               $(STRIP) lib/nameservice/olsrd_nameservice.dll
+               $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
                rm -f olsr-setup.exe
                rm -f olsr-${VERS}-setup.exe
                C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
@@ -181,6 +201,7 @@ endif
 endif
 endif
 endif
+endif
 
 ifneq ($(NODEBUG), )
 CFLAGS += -DNODEBUG
@@ -285,9 +306,12 @@ httpinfo:
 
 dot_draw:
                $(MAKE) -C lib/dot_draw clean
-               $(MAKE) -C lib/dot_draw 
                $(MAKE) -C lib/dot_draw install
 
+nameservice:
+               $(MAKE) -C lib/nameservice clean
+               $(MAKE) -C lib/nameservice install
+
 dyn_gw:
                $(MAKE) -C lib/dyn_gw clean
                $(MAKE) -C lib/dyn_gw