Added usage of olsr_bool for boolean use
[olsrd.git] / Makefile.win32.in
1 VERS =          0.4.8
2
3 MAINOBJS =      src/build_msg.o \
4                 src/duplicate_set.o \
5                 src/generate_msg.o \
6                 src/hashing.o \
7                 src/hna_set.o \
8                 src/hysteresis.o \
9                 src/interfaces.o \
10                 src/ipc_frontend.o \
11                 src/link_set.o \
12                 src/local_hna_set.o \
13                 src/main.o \
14                 src/mantissa.o \
15                 src/mid_set.o \
16                 src/mpr.o \
17                 src/mpr_selector_set.o \
18                 src/neighbor_table.o \
19                 src/net.o \
20                 src/olsr.o \
21                 src/packet.o \
22                 src/parser.o \
23                 src/plugin.o \
24                 src/plugin_loader.o \
25                 src/process_package.o \
26                 src/process_routes.o \
27                 src/rebuild_packet.o \
28                 src/routing_table.o \
29                 src/scheduler.o \
30                 src/socket_parser.o \
31                 src/tc_set.o \
32                 src/two_hop_neighbor_table.o \
33                 src/cfgparser/oparse.o \
34                 src/cfgparser/oscan.o \
35                 src/cfgparser/olsrd_conf.o \
36                 src/win32/apm.o \
37                 src/win32/compat.o \
38                 src/win32/ifnet.o \
39                 src/win32/kernel_routes.o \
40                 src/win32/log.o \
41                 src/win32/net.o \
42                 src/win32/tunnel.o
43
44 CONFDLLOBJS =   src/win32/olsrconf.def \
45                 src/cfgparser/oparse.o \
46                 src/cfgparser/oscan.o \
47                 src/cfgparser/confdll-olsrd_conf.o \
48                 src/win32/compat.o
49
50 CONFEXEOBJS =   src/cfgparser/oparse.o \
51                 src/cfgparser/oscan.o \
52                 src/cfgparser/confexe-olsrd_conf.o \
53                 src/win32/compat.o
54
55 all:            olsrd.exe olsrconf.dll olsrconf.exe
56
57 src/cfgparser/oscan.c:  src/cfgparser/oscan.lex \
58                 src/cfgparser/oparse.h src/cfgparser/olsrd_conf.h
59                 flex -osrc/cfgparser/oscan.c src/cfgparser/oscan.lex
60
61 src/cfgparser/oparse.c: src/cfgparser/oparse.y src/cfgparser/olsrd_conf.h
62                 bison -d -osrc/cfgparser/oparse.c src/cfgparser/oparse.y
63
64 %.o:            %.c
65                 gcc -mno-cygwin -O2 -Wall -c -DWIN32 \
66                 -Isrc -Isrc/win32 -o$@ $<
67
68 confdll-%.o:    %.c
69                 gcc -mno-cygwin -O2 -Wall -c -DWIN32 -DMAKELIB \
70                 -Isrc -Isrc/win32 -o$@ $<
71
72 confexe-%.o:    %.c
73                 gcc -mno-cygwin -O2 -Wall -c -DWIN32 -DMAKEBIN \
74                 -Isrc -Isrc/win32 -o$@ $<
75
76 olsrd.exe:      $(MAINOBJS)
77                 gcc -mno-cygwin -o olsrd.exe $(MAINOBJS) -lws2_32 -liphlpapi
78
79 olsrconf.dll:   $(CONFDLLOBJS)
80                 gcc -mno-cygwin -shared -o olsrconf.dll $(CONFDLLOBJS) \
81                 -lws2_32 -Wl,--out-implib,olsrconf.lib
82
83 olsrconf.exe:   $(CONFEXEOBJS)
84                 gcc -mno-cygwin -o olsrconf.exe $(CONFEXEOBJS) -lws2_32
85
86 clean:
87                 rm -f *.exe *.dll *.lib *.zip
88                 rm -f src/cfgparser/oparse.c src/cfgparser/oparse.h
89                 rm -f src/cfgparser/oscan.c
90                 find . -name \*~ -exec rm -f {} \;
91                 find src -name \*.o -exec rm -f {} \;
92
93 mclean:         clean
94                 rm -f Makefile.win32
95
96 olsr-${VERS}.zip:       gui/win32/Main/Release/Switch.exe \
97                 gui/win32/Shim/Release/Shim.exe \
98                 olsrd.exe \
99                 README-WIN32.txt \
100                 gui/win32/Inst/linux-manual.txt \
101                 files/olsrd.conf.default.win32 \
102                 lib/dot_draw/olsrd_dot_draw.dll
103                 rm -rf ${TEMP}/olsr-${VERS}
104                 rm -f ${TEMP}/olsr-${VERS}.zip
105                 rm -f olsr-${VERS}.zip
106                 mkdir ${TEMP}/olsr-${VERS}
107                 cp gui/win32/Main/Release/Switch.exe ${TEMP}/olsr-${VERS}
108                 cp gui/win32/Shim/Release/Shim.exe ${TEMP}/olsr-${VERS}
109                 cp olsrd.exe ${TEMP}/olsr-${VERS}
110                 cp README-WIN32.txt ${TEMP}/olsr-${VERS}
111                 cp gui/win32/Inst/linux-manual.txt ${TEMP}/olsr-${VERS}
112                 cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/Default.olsr
113                 cp lib/dot_draw/olsrd_dot_draw.dll ${TEMP}/olsr-${VERS}
114                 cd ${TEMP}; echo y | cacls olsr-${VERS} /T /G Everyone:F
115                 cd ${TEMP}; zip -q -r olsr-${VERS}.zip olsr-${VERS}
116                 cp ${TEMP}/olsr-${VERS}.zip .
117                 rm -rf ${TEMP}olsr-${VERS}
118                 rm -f ${TEMP}/olsr-${VERS}.zip
119
120 olsr-${VERS}-setup.exe: gui/win32/Main/Release/Switch.exe \
121                 gui/win32/Shim/Release/Shim.exe \
122                 olsrd.exe \
123                 README-WIN32.txt \
124                 gui/win32/Inst/linux-manual.txt \
125                 files/olsrd.conf.default.win32 \
126                 lib/dot_draw/olsrd_dot_draw.dll \
127                 gui/win32/Inst/installer.nsi
128                 rm -f olsr-setup.exe
129                 rm -f olsr-${VERS}-setup.exe
130                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
131                 mv olsr-setup.exe olsr-${VERS}-setup.exe
132