Added Id to makefile
[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) -lws2_32
81
82 olsrconf.exe:   $(CONFEXEOBJS)
83                 gcc -mno-cygwin -o olsrconf.exe $(CONFEXEOBJS) -lws2_32
84
85 clean:
86                 rm -f *.exe *.dll olsr-${VERS}.zip
87                 find . -name \*~ -exec rm -f {} \;
88                 find src -name \*.o -exec rm -f {} \;
89
90 mclean:         clean
91                 rm -f Makefile.win32
92
93 olsr-${VERS}.zip:       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                 rm -rf ${TEMP}/olsr-${VERS}
101                 rm -f ${TEMP}/olsr-${VERS}.zip
102                 rm -f olsr-${VERS}.zip
103                 mkdir ${TEMP}/olsr-${VERS}
104                 cp gui/win32/Main/Release/Switch.exe ${TEMP}/olsr-${VERS}
105                 cp gui/win32/Shim/Release/Shim.exe ${TEMP}/olsr-${VERS}
106                 cp olsrd.exe ${TEMP}/olsr-${VERS}
107                 cp README-WIN32.txt ${TEMP}/olsr-${VERS}
108                 cp gui/win32/Inst/linux-manual.txt ${TEMP}/olsr-${VERS}
109                 cp files/olsrd.conf.default.win32 ${TEMP}/olsr-${VERS}/Default.olsr
110                 cp lib/dot_draw/olsrd_dot_draw.dll ${TEMP}/olsr-${VERS}
111                 cd ${TEMP}; echo y | cacls olsr-${VERS} /T /G Everyone:F
112                 cd ${TEMP}; zip -q -r olsr-${VERS}.zip olsr-${VERS}
113                 cp ${TEMP}/olsr-${VERS}.zip .
114                 rm -rf ${TEMP}olsr-${VERS}
115                 rm -f ${TEMP}/olsr-${VERS}.zip
116
117 olsr-${VERS}-setup.exe: gui/win32/Main/Release/Switch.exe \
118                 gui/win32/Shim/Release/Shim.exe \
119                 olsrd.exe \
120                 README-WIN32.txt \
121                 gui/win32/Inst/linux-manual.txt \
122                 files/olsrd.conf.default.win32 \
123                 lib/dot_draw/olsrd_dot_draw.dll \
124                 gui/win32/Inst/installer.nsi
125                 rm -f olsr-setup.exe
126                 rm -f olsr-${VERS}-setup.exe
127                 C:/Program\ Files/NSIS/makensis gui\win32\Inst\installer.nsi
128                 mv olsr-setup.exe olsr-${VERS}-setup.exe
129