ac59338bb90c7fc64df95c5f75509ec3befbce95
[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 DEFINES +=      -DWIN32 -D_WIN32_WINNT=0x0600
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/release/Main.exe \
29                 gui/win32/release/Shim.exe \
30                 olsrd.exe \
31                 olsr_switch.exe \
32                 src/cfgparser/olsrd_cfgparser.dll \
33                 README \
34                 README-Link-Quality.html \
35                 README-Link-Quality-Fish-Eye.txt \
36                 README-Olsr-Switch.html \
37                 gui/win32/Inst/linux-manual.txt \
38                 files/olsrd.conf.win32.rfc \
39                 files/olsrd.conf.win32.lq \
40                 gui/win32/Main/RFC-Default.olsr \
41                 gui/win32/Main/LQ-Default.olsr \
42                 lib/dot_draw/olsrd_dot_draw.dll \
43                 lib/httpinfo/olsrd_httpinfo.dll
44                 $(STRIP) olsrd.exe
45                 $(STRIP) olsr_switch.exe
46                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
47                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
48                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
49                 rm -rf $(TEMP)/olsr-$(VERS)
50                 rm -f $(TEMP)/olsr-$(VERS).zip
51                 rm -f olsr-$(VERS).zip
52                 mkdir $(TEMP)/olsr-$(VERS)
53                 cp gui/win32/release/Main.exe $(TEMP)/olsr-$(VERS)/Switch.exe
54                 cp gui/win32/release/Shim.exe $(TEMP)/olsr-$(VERS)
55                 cp olsrd.exe $(TEMP)/olsr-$(VERS)
56                 cp olsr_switch.exe $(TEMP)/olsr-$(VERS)
57                 cp src/cfgparser/olsrd_cfgparser.dll $(TEMP)/olsr-$(VERS)
58                 cp README $(TEMP)/olsr-$(VERS)
59                 cp README-Link-Quality.html $(TEMP)/olsr-$(VERS)
60                 cp README-Link-Quality-Fish-Eye.txt $(TEMP)/olsr-$(VERS)
61                 cp README-Olsr-Switch.html $(TEMP)/olsr-$(VERS)
62                 cp gui/win32/Inst/linux-manual.txt $(TEMP)/olsr-$(VERS)
63                 cp files/olsrd.conf.win32.rfc $(TEMP)/olsr-$(VERS)/olsrd.conf.rfc
64                 cp files/olsrd.conf.win32.lq $(TEMP)/olsr-$(VERS)/olsrd.conf.lq
65                 cp gui/win32/Main/RFC-Default.olsr $(TEMP)/olsr-$(VERS)
66                 cp gui/win32/Main/LQ-Default.olsr $(TEMP)/olsr-$(VERS)/Default.olsr
67                 cp lib/dot_draw/olsrd_dot_draw.dll $(TEMP)/olsr-$(VERS)
68                 cp lib/httpinfo/olsrd_httpinfo.dll $(TEMP)/olsr-$(VERS)
69                 echo y | cacls $(TEMP)\olsr-$(VERS) /T /G Everyone:F
70                 cd "$(TEMP)"; zip -q -r olsr-$(VERS).zip olsr-$(VERS)
71                 cp $(TEMP)/olsr-$(VERS).zip .
72                 rm -rf $(TEMP)/olsr-$(VERS)
73                 rm -f $(TEMP)/olsr-$(VERS).zip
74
75 olsr-$(VERS)-setup.exe: gui/win32/release/Main.exe \
76                 gui/win32/release/Shim.exe \
77                 olsrd.exe \
78                 olsr_switch.exe \
79                 src/cfgparser/olsrd_cfgparser.dll \
80                 README \
81                 README-Link-Quality.html \
82                 README-Link-Quality-Fish-Eye.txt \
83                 README-Olsr-Switch.html \
84                 gui/win32/Inst/linux-manual.txt \
85                 files/olsrd.conf.win32.rfc \
86                 files/olsrd.conf.win32.lq \
87                 gui/win32/Main/RFC-Default.olsr \
88                 gui/win32/Main/LQ-Default.olsr \
89                 lib/dot_draw/olsrd_dot_draw.dll \
90                 lib/httpinfo/olsrd_httpinfo.dll \
91                 gui/win32/Inst/installer.nsi
92                 $(STRIP) olsrd.exe
93                 $(STRIP) olsr_switch.exe
94                 $(STRIP) src/cfgparser/olsrd_cfgparser.dll
95                 $(STRIP) lib/dot_draw/olsrd_dot_draw.dll
96                 $(STRIP) lib/nameservice/olsrd_nameservice.dll
97                 $(STRIP) lib/httpinfo/olsrd_httpinfo.dll
98                 rm -f olsr-setup.exe
99                 rm -f olsr-$(VERS)-setup.exe
100                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
101                 mv olsr-setup.exe olsr-$(VERS)-setup.exe
102
103 # Local Variables:
104 # mode: makefile
105 # End: