Automated distribution packaging. Uninstall dot draw plugin.
[olsrd.git] / Makefile.win32.in
1 VERS =          0.4.7
2
3 OBJS =          src/build_msg.o \
4                 src/configfile.o \
5                 src/duplicate_set.o \
6                 src/generate_msg.o \
7                 src/hashing.o \
8                 src/hna_set.o \
9                 src/hysteresis.o \
10                 src/interfaces.o \
11                 src/ipc_frontend.o \
12                 src/link_set.o \
13                 src/local_hna_set.o \
14                 src/main.o \
15                 src/mantissa.o \
16                 src/mid_set.o \
17                 src/mpr.o \
18                 src/mpr_selector_set.o \
19                 src/neighbor_table.o \
20                 src/net.o \
21                 src/olsr.o \
22                 src/packet.o \
23                 src/parser.o \
24                 src/plugin.o \
25                 src/plugin_loader.o \
26                 src/process_package.o \
27                 src/process_routes.o \
28                 src/rebuild_packet.o \
29                 src/routing_table.o \
30                 src/scheduler.o \
31                 src/socket_parser.o \
32                 src/tc_set.o \
33                 src/two_hop_neighbor_table.o \
34                 src/win32/apm.o \
35                 src/win32/compat.o \
36                 src/win32/ifnet.o \
37                 src/win32/kernel_routes.o \
38                 src/win32/net.o \
39                 src/win32/tunnel.o
40
41 %.o:            %.c
42                 gcc -mno-cygwin -O2 -Wall -c -DWIN32 \
43                 -Isrc -Isrc/win32 -o$@ $<
44
45 olsrd.exe:      $(OBJS)
46                 gcc -mno-cygwin -o olsrd.exe $(OBJS) -lws2_32 -liphlpapi
47
48 clean:
49                 rm -f olsrd.exe olsr-${VERS}.zip olsr-${VERS}-setup.exe *.dll
50                 find . -name \*~ -exec rm -f {} \;
51                 find src -name \*.o -exec rm -f {} \;
52
53 mclean:         clean
54                 rm -f Makefile.win32
55
56 olsr-${VERS}.zip:       gui/win32/Main/Release/Switch.exe \
57                 gui/win32/Shim/Release/Shim.exe \
58                 olsrd.exe \
59                 README-WIN32.txt \
60                 gui/win32/Inst/linux-manual.txt \
61                 files/olsrd.conf.default.win32 \
62                 lib/dot_draw/olsrd_dot_draw.dll
63                 rm -rf ${TEMP}/olsr-${VERS}
64                 rm -f ${TEMP}/olsr-${VERS}.zip
65                 rm -f olsr-${VERS}.zip
66                 mkdir ${TEMP}/olsr-${VERS}
67                 cp gui/win32/Main/Release/Switch.exe ${TEMP}/olsr-${VERS}
68                 cp gui/win32/Shim/Release/Shim.exe ${TEMP}/olsr-${VERS}
69                 cp olsrd.exe ${TEMP}/olsr-${VERS}
70                 cp README-WIN32.txt ${TEMP}/olsr-${VERS}
71                 cp gui/win32/Inst/linux-manual.txt ${TEMP}/olsr-${VERS}
72                 cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/Default.olsr
73                 cp lib/dot_draw/olsrd_dot_draw.dll ${TEMP}/olsr-${VERS}
74                 cd ${TEMP}; echo y | cacls olsr-${VERS} /T /G Everyone:F
75                 cd ${TEMP}; zip -q -r olsr-${VERS}.zip olsr-${VERS}
76                 cp ${TEMP}/olsr-${VERS}.zip .
77                 rm -rf ${TEMP}olsr-${VERS}
78                 rm -f ${TEMP}/olsr-${VERS}.zip
79
80 olsr-${VERS}-setup.exe: gui/win32/Main/Release/Switch.exe \
81                 gui/win32/Shim/Release/Shim.exe \
82                 olsrd.exe \
83                 README-WIN32.txt \
84                 gui/win32/Inst/linux-manual.txt \
85                 files/olsrd.conf.default.win32 \
86                 lib/dot_draw/olsrd_dot_draw.dll \
87                 gui/win32/Inst/installer.nsi
88                 rm -f olsr-setup.exe
89                 rm -f olsr-${VERS}-setup.exe
90                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
91                 mv olsr-setup.exe olsr-${VERS}-setup.exe
92