* added a comment
[olsrd.git] / make / Makefile.win32
1 #
2 # WINDOWS32 SPECIFIC CONFIGURATION
3 #
4
5 DESTDIR ?=
6 EXENAME = olsrd.exe
7
8 SRCS +=         $(wildcard src/win32/*.c)
9 HDRS +=         $(wildcard src/win32/*.h)
10
11 CPPFLAGS +=     -DWIN32 -D_WIN32_WINNT=0x0600
12 LIBS +=         -mno-cygwin -lws2_32 -liphlpapi
13 CPPFLAGS +=     -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_CFLAG_PTHREAD =
27 OS_LIB_DYNLOAD =
28
29 olsr-$(VERS).zip:       gui/win32/release/Main.exe \
30                 gui/win32/release/Shim.exe \
31                 olsrd.exe \
32                 olsr_switch.exe \
33                 src/cfgparser/olsrd_cfgparser.dll \
34                 README \
35                 README-Link-Quality.html \
36                 README-Link-Quality-Fish-Eye.txt \
37                 README-Olsr-Switch.html \
38                 gui/win32/Inst/linux-manual.txt \
39                 files/olsrd.conf.win32.rfc \
40                 files/olsrd.conf.win32.lq \
41                 gui/win32/Main/RFC-Default.olsr \
42                 gui/win32/Main/LQ-Default.olsr \
43                 lib/dot_draw/olsrd_dot_draw.dll \
44                 lib/httpinfo/olsrd_httpinfo.dll
45                 $(STRIP) olsrd.exe
46                 $(STRIP) olsr_switch.exe
47                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
48                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
49                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
50                 rm -rf $(TEMP)/olsr-$(VERS)
51                 rm -f $(TEMP)/olsr-$(VERS).zip
52                 rm -f olsr-$(VERS).zip
53                 mkdir $(TEMP)/olsr-$(VERS)
54                 cp gui/win32/release/Main.exe $(TEMP)/olsr-$(VERS)/Switch.exe
55                 cp gui/win32/release/Shim.exe $(TEMP)/olsr-$(VERS)
56                 cp olsrd.exe $(TEMP)/olsr-$(VERS)
57                 cp olsr_switch.exe $(TEMP)/olsr-$(VERS)
58                 cp src/cfgparser/olsrd_cfgparser.dll $(TEMP)/olsr-$(VERS)
59                 cp README $(TEMP)/olsr-$(VERS)
60                 cp README-Link-Quality.html $(TEMP)/olsr-$(VERS)
61                 cp README-Link-Quality-Fish-Eye.txt $(TEMP)/olsr-$(VERS)
62                 cp README-Olsr-Switch.html $(TEMP)/olsr-$(VERS)
63                 cp gui/win32/Inst/linux-manual.txt $(TEMP)/olsr-$(VERS)
64                 cp files/olsrd.conf.win32.rfc $(TEMP)/olsr-$(VERS)/olsrd.conf.rfc
65                 cp files/olsrd.conf.win32.lq $(TEMP)/olsr-$(VERS)/olsrd.conf.lq
66                 cp gui/win32/Main/RFC-Default.olsr $(TEMP)/olsr-$(VERS)
67                 cp gui/win32/Main/LQ-Default.olsr $(TEMP)/olsr-$(VERS)/Default.olsr
68                 cp lib/dot_draw/olsrd_dot_draw.dll $(TEMP)/olsr-$(VERS)
69                 cp lib/httpinfo/olsrd_httpinfo.dll $(TEMP)/olsr-$(VERS)
70                 echo y | cacls $(TEMP)\olsr-$(VERS) /T /G Everyone:F
71                 cd "$(TEMP)"; zip -q -r olsr-$(VERS).zip olsr-$(VERS)
72                 cp $(TEMP)/olsr-$(VERS).zip .
73                 rm -rf $(TEMP)/olsr-$(VERS)
74                 rm -f $(TEMP)/olsr-$(VERS).zip
75
76 olsr-$(VERS)-setup.exe: gui/win32/release/Main.exe \
77                 gui/win32/release/Shim.exe \
78                 olsrd.exe \
79                 olsr_switch.exe \
80                 src/cfgparser/olsrd_cfgparser.dll \
81                 README \
82                 README-Link-Quality.html \
83                 README-Link-Quality-Fish-Eye.txt \
84                 README-Olsr-Switch.html \
85                 gui/win32/Inst/linux-manual.txt \
86                 files/olsrd.conf.win32.rfc \
87                 files/olsrd.conf.win32.lq \
88                 gui/win32/Main/RFC-Default.olsr \
89                 gui/win32/Main/LQ-Default.olsr \
90                 lib/dot_draw/olsrd_dot_draw.dll \
91                 lib/httpinfo/olsrd_httpinfo.dll \
92                 gui/win32/Inst/installer.nsi
93                 $(STRIP) olsrd.exe
94                 $(STRIP) olsr_switch.exe
95                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
96                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
97                 $(STRIP) lib/nameservice/olsrd_nameservice.dll
98                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
99                 rm -f olsr-setup.exe
100                 rm -f olsr-$(VERS)-setup.exe
101                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
102                 mv olsr-setup.exe olsr-$(VERS)-setup.exe
103
104 # Local Variables:
105 # mode: makefile
106 # End: