9f2f3a24a6baa2023b3b949c0a49965bd966f5aa
[olsrd.git] / make / Makefile.win32
1 #
2 # WINDOWS32 SPECIFIC CONFIGURATION
3 #
4
5 INSTALL_PREFIX ?=
6 EXENAME = olsrd.exe
7
8 SRCS +=         $(wildcard src/win32/*.c)
9 HDRS +=         $(wildcard src/win32/*.h)
10
11 DEFINES +=      -DWIN32
12 LIBS +=         -mno-cygwin -lws2_32 -liphlpapi
13 INCLUDES +=     -I$(TOPDIR)/src/win32
14 CFLAGS +=       -mno-cygwin
15
16 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).dll
17 INSTALL_LIB =   cp $(PLUGIN_FULLNAME) ../..
18
19 ifdef OLSRD_PLUGIN
20 LDFLAGS +=      -L$(TOPDIR)
21 #LIBS +=        $(TOPDIR)/src/win32/compat.o
22 LIBS +=         -lolsrd
23 endif
24
25 OS_LIB_PTHREAD =
26 OS_LIB_DYNLOAD =
27
28 olsr-$(VERS).zip:       gui/win32/Main/Release/Switch.exe \
29                 gui/win32/Shim/Release/Shim.exe \
30                 olsrd.exe \
31                 src/cfgparser/olsrd_cfgparser.dll \
32                 README \
33                 README-Link-Quality.html \
34                 gui/win32/Inst/linux-manual.txt \
35                 files/olsrd.conf.win32.rfc \
36                 files/olsrd.conf.win32.lq \
37                 gui/win32/Main/RFC-Default.olsr \
38                 gui/win32/Main/LQ-Default.olsr \
39                 lib/dot_draw/olsrd_dot_draw.dll \
40                 lib/nameservice/olsrd_nameservice.dll \
41                 lib/httpinfo/olsrd_httpinfo.dll
42                 $(STRIP) olsrd.exe
43                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
44                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
45                 $(STRIP) lib/nameservice/olsrd_nameservice.dll
46                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
47                 rm -rf $(TEMP)/olsr-$(VERS)
48                 rm -f $(TEMP)/olsr-$(VERS).zip
49                 rm -f olsr-$(VERS).zip
50                 mkdir $(TEMP)/olsr-$(VERS)
51                 cp gui/win32/Main/Release/Switch.exe $(TEMP)/olsr-$(VERS)
52                 cp gui/win32/Shim/Release/Shim.exe $(TEMP)/olsr-$(VERS)
53                 cp olsrd.exe $(TEMP)/olsr-$(VERS)
54                 cp src/cfgparser/olsrd_cfgparser.dll $(TEMP)/olsr-$(VERS)
55                 cp README $(TEMP)/olsr-$(VERS)
56                 cp README-Link-Quality.html $(TEMP)/olsr-$(VERS)
57                 cp gui/win32/Inst/linux-manual.txt $(TEMP)/olsr-$(VERS)
58                 cp files/olsrd.conf.win32.rfc $(TEMP)/olsr-$(VERS)/olsrd.conf.rfc
59                 cp files/olsrd.conf.win32.lq $(TEMP)/olsr-$(VERS)/olsrd.conf.lq
60                 cp gui/win32/Main/RFC-Default.olsr $(TEMP)/olsr-$(VERS)
61                 cp gui/win32/Main/LQ-Default.olsr $(TEMP)/olsr-$(VERS)/Default.olsr
62                 cp lib/dot_draw/olsrd_dot_draw.dll $(TEMP)/olsr-$(VERS)
63                 cp lib/nameservice/olsrd_nameservice.dll $(TEMP)/olsr-$(VERS)
64                 cp lib/httpinfo/olsrd_httpinfo.dll $(TEMP)/olsr-$(VERS)
65                 cd $(TEMP); echo y | cacls olsr-$(VERS) /T /G Everyone:F
66                 cd $(TEMP); zip -q -r olsr-$(VERS).zip olsr-$(VERS)
67                 cp $(TEMP)/olsr-$(VERS).zip .
68                 rm -rf $(TEMP)/olsr-$(VERS)
69                 rm -f $(TEMP)/olsr-$(VERS).zip
70
71 olsr-$(VERS)-setup.exe: gui/win32/Main/Release/Switch.exe \
72                 gui/win32/Shim/Release/Shim.exe \
73                 olsrd.exe \
74                 src/cfgparser/olsrd_cfgparser.dll \
75                 README \
76                 README-Link-Quality.html \
77                 gui/win32/Inst/linux-manual.txt \
78                 files/olsrd.conf.win32.rfc \
79                 files/olsrd.conf.win32.lq \
80                 gui/win32/Main/RFC-Default.olsr \
81                 gui/win32/Main/LQ-Default.olsr \
82                 lib/dot_draw/olsrd_dot_draw.dll \
83                 lib/nameservice/olsrd_nameservice.dll \
84                 lib/httpinfo/olsrd_httpinfo.dll \
85                 gui/win32/Inst/installer.nsi
86                 $(STRIP) olsrd.exe
87                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
88                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
89                 $(STRIP) lib/nameservice/olsrd_nameservice.dll
90                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
91                 rm -f olsr-setup.exe
92                 rm -f olsr-$(VERS)-setup.exe
93                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
94                 mv olsr-setup.exe olsr-$(VERS)-setup.exe