*** empty log message ***
[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/cfgparser/oscan.o \
35                 src/cfgparser/oparse.o \
36                 src/cfgparser/olsrd_conf.o \
37                 src/win32/apm.o \
38                 src/win32/compat.o \
39                 src/win32/ifnet.o \
40                 src/win32/kernel_routes.o \
41                 src/win32/log.o \
42                 src/win32/net.o \
43                 src/win32/tunnel.o
44
45 all:            olsrd.exe
46
47 src/cfgparser/oscan.c:  src/cfgparser/oscan.lex \
48                 src/cfgparser/oparse.h src/cfgparser/olsrd_conf.h
49                 flex -osrc/cfgparser/oscan.c src/cfgparser/oscan.lex
50
51 src/cfgparser/oparse.c: src/cfgparser/oparse.y src/cfgparser/olsrd_conf.h
52                 bison -d -osrc/cfgparser/oparse.c src/cfgparser/oparse.y
53
54 %.o:            %.c
55                 gcc -mno-cygwin -O2 -Wall -c -DWIN32 \
56                 -Isrc -Isrc/win32 -o$@ $<
57
58 olsrd.exe:      $(OBJS)
59                 gcc -mno-cygwin -o olsrd.exe $(OBJS) -lws2_32 -liphlpapi
60
61 clean:
62                 rm -f olsrd.exe olsr-${VERS}.zip olsr-${VERS}-setup.exe *.dll
63                 find . -name \*~ -exec rm -f {} \;
64                 find src -name \*.o -exec rm -f {} \;
65
66 mclean:         clean
67                 rm -f Makefile.win32
68
69 olsr-${VERS}.zip:       gui/win32/Main/Release/Switch.exe \
70                 gui/win32/Shim/Release/Shim.exe \
71                 olsrd.exe \
72                 README-WIN32.txt \
73                 gui/win32/Inst/linux-manual.txt \
74                 files/olsrd.conf.default.win32 \
75                 lib/dot_draw/olsrd_dot_draw.dll
76                 rm -rf ${TEMP}/olsr-${VERS}
77                 rm -f ${TEMP}/olsr-${VERS}.zip
78                 rm -f olsr-${VERS}.zip
79                 mkdir ${TEMP}/olsr-${VERS}
80                 cp gui/win32/Main/Release/Switch.exe ${TEMP}/olsr-${VERS}
81                 cp gui/win32/Shim/Release/Shim.exe ${TEMP}/olsr-${VERS}
82                 cp olsrd.exe ${TEMP}/olsr-${VERS}
83                 cp README-WIN32.txt ${TEMP}/olsr-${VERS}
84                 cp gui/win32/Inst/linux-manual.txt ${TEMP}/olsr-${VERS}
85                 cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/Default.olsr
86                 cp lib/dot_draw/olsrd_dot_draw.dll ${TEMP}/olsr-${VERS}
87                 cd ${TEMP}; echo y | cacls olsr-${VERS} /T /G Everyone:F
88                 cd ${TEMP}; zip -q -r olsr-${VERS}.zip olsr-${VERS}
89                 cp ${TEMP}/olsr-${VERS}.zip .
90                 rm -rf ${TEMP}olsr-${VERS}
91                 rm -f ${TEMP}/olsr-${VERS}.zip
92
93 olsr-${VERS}-setup.exe: gui/win32/Main/Release/Switch.exe \
94                 gui/win32/Shim/Release/Shim.exe \
95                 olsrd.exe \
96                 README-WIN32.txt \
97                 gui/win32/Inst/linux-manual.txt \
98                 files/olsrd.conf.default.win32 \
99                 lib/dot_draw/olsrd_dot_draw.dll \
100                 gui/win32/Inst/installer.nsi
101                 rm -f olsr-setup.exe
102                 rm -f olsr-${VERS}-setup.exe
103                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
104                 mv olsr-setup.exe olsr-${VERS}-setup.exe
105