Plugin interface updates, topology is generated upon every connection
[olsrd.git] / Makefile.win32.in
index 5f61ac1..8ea3c55 100644 (file)
@@ -1,5 +1,6 @@
-OBJS =         src/build_msg.o \
-               src/configfile.o \
+VERS =         0.4.8
+
+MAINOBJS =     src/build_msg.o \
                src/duplicate_set.o \
                src/generate_msg.o \
                src/hashing.o \
@@ -29,24 +30,104 @@ OBJS =             src/build_msg.o \
                src/socket_parser.o \
                src/tc_set.o \
                src/two_hop_neighbor_table.o \
+               src/cfgparser/oparse.o \
+               src/cfgparser/oscan.o \
+               src/cfgparser/olsrd_conf.o \
+               src/lq_packet.o \
                src/win32/apm.o \
                src/win32/compat.o \
                src/win32/ifnet.o \
                src/win32/kernel_routes.o \
+               src/win32/log.o \
                src/win32/net.o \
                src/win32/tunnel.o
 
+CONFDLLOBJS =  src/win32/olsrconf.def \
+               src/cfgparser/oparse.o \
+               src/cfgparser/oscan.o \
+               src/cfgparser/confdll-olsrd_conf.o \
+               src/win32/compat.o
+
+CONFEXEOBJS =  src/cfgparser/oparse.o \
+               src/cfgparser/oscan.o \
+               src/cfgparser/confexe-olsrd_conf.o \
+               src/win32/compat.o
+
+all:           olsrd.exe olsrconf.dll olsrconf.exe
+
+src/cfgparser/oscan.c: src/cfgparser/oscan.lex \
+               src/cfgparser/oparse.h src/cfgparser/olsrd_conf.h
+               flex -osrc/cfgparser/oscan.c src/cfgparser/oscan.lex
+
+src/cfgparser/oparse.c:        src/cfgparser/oparse.y src/cfgparser/olsrd_conf.h
+               bison -d -osrc/cfgparser/oparse.c src/cfgparser/oparse.y
+
 %.o:           %.c
                gcc -mno-cygwin -O2 -Wall -c -DWIN32 \
                -Isrc -Isrc/win32 -o$@ $<
 
-olsrd:         $(OBJS)
-               gcc -mno-cygwin -o olsrd.exe $(OBJS) -lws2_32 -liphlpapi
+confdll-%.o:   %.c
+               gcc -mno-cygwin -O2 -Wall -c -DWIN32 -DMAKELIB \
+               -Isrc -Isrc/win32 -o$@ $<
+
+confexe-%.o:   %.c
+               gcc -mno-cygwin -O2 -Wall -c -DWIN32 -DMAKEBIN \
+               -Isrc -Isrc/win32 -o$@ $<
+
+olsrd.exe:     $(MAINOBJS)
+               gcc -mno-cygwin -o olsrd.exe $(MAINOBJS) -lws2_32 -liphlpapi
+
+olsrconf.dll:  $(CONFDLLOBJS)
+               gcc -mno-cygwin -shared -o olsrconf.dll $(CONFDLLOBJS) \
+               -lws2_32 -Wl,--out-implib,olsrconf.lib
+
+olsrconf.exe:  $(CONFEXEOBJS)
+               gcc -mno-cygwin -o olsrconf.exe $(CONFEXEOBJS) -lws2_32
 
 clean:
-               rm -f olsrd.exe *.dll
+               rm -f *.exe *.dll *.lib *.zip
+               rm -f src/cfgparser/oparse.c src/cfgparser/oparse.h
+               rm -f src/cfgparser/oscan.c
                find . -name \*~ -exec rm -f {} \;
                find src -name \*.o -exec rm -f {} \;
 
 mclean:                clean
                rm -f Makefile.win32
+
+olsr-${VERS}.zip:      gui/win32/Main/Release/Switch.exe \
+               gui/win32/Shim/Release/Shim.exe \
+               olsrd.exe \
+               README-WIN32.txt \
+               gui/win32/Inst/linux-manual.txt \
+               files/olsrd.conf.default.win32 \
+               lib/dot_draw/olsrd_dot_draw.dll
+               rm -rf ${TEMP}/olsr-${VERS}
+               rm -f ${TEMP}/olsr-${VERS}.zip
+               rm -f olsr-${VERS}.zip
+               mkdir ${TEMP}/olsr-${VERS}
+               cp gui/win32/Main/Release/Switch.exe ${TEMP}/olsr-${VERS}
+               cp gui/win32/Shim/Release/Shim.exe ${TEMP}/olsr-${VERS}
+               cp olsrd.exe ${TEMP}/olsr-${VERS}
+               cp README-WIN32.txt ${TEMP}/olsr-${VERS}
+               cp gui/win32/Inst/linux-manual.txt ${TEMP}/olsr-${VERS}
+               cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/Default.olsr
+               cp lib/dot_draw/olsrd_dot_draw.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 .
+               rm -rf ${TEMP}olsr-${VERS}
+               rm -f ${TEMP}/olsr-${VERS}.zip
+
+olsr-${VERS}-setup.exe:        gui/win32/Main/Release/Switch.exe \
+               gui/win32/Shim/Release/Shim.exe \
+               olsrd.exe \
+               README-WIN32.txt \
+               gui/win32/Inst/linux-manual.txt \
+               files/olsrd.conf.default.win32 \
+               lib/dot_draw/olsrd_dot_draw.dll \
+               gui/win32/Inst/installer.nsi
+               rm -f olsr-setup.exe
+               rm -f olsr-${VERS}-setup.exe
+               C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
+               mv olsr-setup.exe olsr-${VERS}-setup.exe
+