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