Adapted Windows code to the new system-independent syslog and APM
[olsrd.git] / mkmf.sh
1 #!/bin/sh
2
3 srcs="\
4     src/build_msg.c \
5     src/configfile.c \
6     src/duplicate_set.c \
7     src/generate_msg.c \
8     src/hashing.c \
9     src/hna_set.c \
10     src/hysteresis.c \
11     src/interfaces.c \
12     src/ipc_frontend.c \
13     src/link_set.c \
14     src/local_hna_set.c \
15     src/main.c \
16     src/mantissa.c \
17     src/mid_set.c \
18     src/mpr.c \
19     src/mpr_selector_set.c \
20     src/neighbor_table.c \
21     src/net.c \
22     src/olsr.c \
23     src/packet.c \
24     src/parser.c \
25     src/plugin.c \
26     src/plugin_loader.c \
27     src/process_package.c \
28     src/process_routes.c \
29     src/rebuild_packet.c \
30     src/routing_table.c \
31     src/scheduler.c \
32     src/socket_parser.c \
33     src/tc_set.c \
34     src/two_hop_neighbor_table.c \
35     src/win32/apm.c \
36     src/win32/compat.c \
37     src/win32/ifnet.c \
38     src/win32/kernel_routes.c \
39     src/win32/log.c \
40     src/win32/net.c \
41     src/win32/tunnel.c \
42     "
43
44 rm -f Makefile.win32
45 cp Makefile.win32.in Makefile.win32
46
47 echo >>Makefile.win32
48 echo \# >>Makefile.win32
49 echo \# DEPENDENCIES >>Makefile.win32
50 echo \# >>Makefile.win32
51
52 for f in $srcs; do
53     echo >>Makefile.win32
54     echo \# $f >>Makefile.win32
55     echo >>Makefile.win32
56
57     o=`echo $f | sed -e 's/c$/o/'`
58
59     gcc -MM -MT $o -mno-cygwin -O2 -Wall -c -DWIN32 -DDEBUG -Isrc -Isrc/win32 $f >>Makefile.win32
60 done