Debian Codegraph @

src/win-mingw.mk

raw symbols SCIP
1 ##########################################################################
2 # Uncomment the following lines to enable options when using Dev-Cpp IDE #
3 ##########################################################################
4
5 #ipv4only=on # Disable support for IPv6 (only required on Windows XP to support IPv4)
6 #debug=1 # Enable debug mode (debug level may be increased to have more information)
7 #multiport=on # Enable support for receiving multiple data flows on the same listening port
8
9 ##########################################################################
10 # Check that following line points to the Dev-Cpp installation directory #
11 ##########################################################################
12
13 DEVDIR = $(SystemDrive)/dev-cpp
14
15 ########################################################
16 # Touching the following lines should not be necessary #
17 ########################################################
18
19 #---------------------
20 # Command-line options
21 #---------------------
22
23 # Enable support for receiving multiple data flows on the same listening port
24 ifdef multiport
25 CXXOPT += -DMULTIPORT
26 endif
27
28 # Disable support for IPv6 (only required on Windows XP to support IPv4)
29 ifndef ipv4only
30 CXXOPT += -DIPv6RECV
31 endif
32
33 # Set debug output level
34 ifdef debug
35 CXXOPT += -DDEBUG=$(debug) -ggdb
36 endif
37
38 #---------------
39 # Static options
40 #---------------
41
42 # Locals
43 VERSION=$(shell cmd /c type ..\\VERSION)
44 CXXOPT += -DVERSION="\"$(VERSION)\""
45 ifeq ($(wildcard ../.svn),../.svn)
46 REVISION=$(shell svnversion -n)
47 else
48 REVISION=$(shell cmd /c type ..\\REVISION)
49 endif
50 CXXOPT += -DREVISION="\"$(REVISION)\""
51
52 COMPONENTS = ITGSend\\ITGSend.exe ITGRecv\\ITGRecv.exe ITGLog\\ITGLog.exe \
53 ITGDec\\ITGDec.exe libITG\\libITG.dll ITGManager\\ITGManager.exe
54 CLEAN_TARGETS = $(addprefix _,$(notdir $(basename $(subst \\,/,$(COMPONENTS)))))
55 OSFLAGS = -DWIN32
56 WARNINGS = -Wall -Wno-deprecated -Wno-strict-aliasing
57
58 # Globals
59 export DEVDIR
60 export BUILD_ENV = WIN32_MINGW
61 export RM = cmd /c del 2>NUL
62 export CP = cmd /c copy
63 export MV = cmd /c move
64 export ECHON = echo | set /p d=
65 export SUFFIX = .exe
66 export SOSUFFIX = .dll
67
68 export CXX = g++
69 export RANLIB = ranlib
70 export AR = ar
71 export CXXFLAGS = -O2 $(CXXOPT) $(OSFLAGS)
72 export LDFLAGS = $(DEVDIR)/Lib/libws2_32.a
73
74 export BASEDIR = $(shell cmd /c cd)
75 export BIN = "$(subst src,bin,$(BASEDIR))"
76 export COMMON = "$(BASEDIR)\common"
77 export EXEC_DIR = $(BASEDIR)\..\bin
78
79 export THOBJS = common/thread.o
80 export OBJS = common/ITG.o common/timestamp.o common/serial.o common/pipes.o
81
82 #-----------
83 # Main rules
84 #-----------
85
86 .PHONY: all
87 all: head $(COMPONENTS)
88 @ cmd /c echo:
89 @ echo ----------------------------------------------------------
90 @ echo D-ITG executables created in $(BIN)
91
92 head:
93 @ cmd /c echo:
94 @ echo ---------------------
95 @ echo Current configuration
96 @ echo ---------------------
97 @ $(ECHON)Enabled features*:
98 ifdef ipv4only
99 @ $(ECHON)ipv4only
100 endif
101 ifdef multiport
102 @ $(ECHON)multiport
103 endif
104 ifdef debug
105 @ $(ECHON)debug=$(debug)
106 endif
107 @ cmd /c echo:
108 @ echo Version: $(VERSION)
109 @ echo Revision: $(REVISION)
110 @ echo Compiler: $(CXX)
111 @ echo OS: $(OS)
112 @ echo OS Flags: $(OSFLAGS)
113 @ echo ------------------------------------------------
114 @ echo * Run "make help" for available options and tips
115 @ cmd /c echo:
116 @ echo ---------------------
117 @ echo Building common files
118 @ echo ---------------------
119
120 help:
121 @ cmd /c echo:
122 @ echo ----------------
123 @ echo Building options
124 @ echo ----------------
125 @ echo debug=N : enable debug mode using verbosity level N
126 @ echo ipv4only=on : disable support for IPv6 (only required on Windows XP to support IPv4)
127 @ echo multiport=on : enable support for receiving multiple flows on the same port number
128 @ echo -------------
129 @ echo Building tips
130 @ echo -------------
131 @ echo - To build D-ITG with options use the following syntax:
132 @ echo make clean all [options]
133
134 #---------------
135 # Building rules
136 #---------------
137 $(COMPONENTS): $(THOBJS) $(OBJS)
138 @ cmd /c echo:
139 @ echo -----------------------
140 @ echo Building $(notdir $@)
141 @ echo -----------------------
142 @ make -C $(dir $@) --no-print-directory
143
144 #-------------
145 # Common rules
146 #-------------
147 include common.mk
148
149
150 #---------------
151 # Cleaning rules
152 #---------------
153 clean: clean_head clean_common $(CLEAN_TARGETS)
154
155 clean_head:
156 @ cmd /c echo:
157 @ echo ----------------
158 @ echo Cleaning sources
159 @ echo ----------------
160
161 clean_common:
162 @ $(ECHON)Cleaning common files...
163 @- $(RM) $(COMMON)\\*.o
164 @ echo done
165
166 $(CLEAN_TARGETS):
167 @ $(ECHON)Cleaning $(subst _,,$@)...
168 @ make -C $(subst _,,$@) --no-print-directory clean
169 @ echo done
170
171 # EOF