updates to get builds working on certain platforms...
[feisty_meow.git] / scripts / clam / cpp / variables.def
1 ###############################################################################
2
3 # CLAM System default variable definitions for C++ compilation.
4
5 ###############################################################################
6
7 ifneq "$(BUILD_PARAMETER_FILE)" ""
8   # define our version of the build parameter file.  this should be set
9   # beforehand so we override the default parameter file for clam.
10   export PARAMETER_FILE = $(BUILD_PARAMETER_FILE)
11 endif
12 ifeq "$(PARAMETER_FILE)" ""
13   # last ditch attempt to get one that will work.
14   export PARAMETER_FILE = $(PRODUCTION_STORE)/feisty_meow_config.ini
15 endif
16
17 ###############################################################################
18
19 # Pull in the base support for CLAM.
20 include variables.def
21
22 ###############################################################################
23
24 # "TYPE" is the kind of product being generated by this project.  this is
25 # used to decide where to put the final products of compilation.  this is a
26 # variable in the user makefile.
27 # Valid Types:
28 #     TYPE = library        (outputs are static or dynamic libraries)
29 #     TYPE = application    (outputs are main-line executables)
30 #     TYPE = test           (outputs are test programs)
31 #     TYPE = hierarchy      (there are no outputs; just invokes other makes)
32 export TYPE
33
34 ###############################################################################
35
36 # "DEFINITIONS" is a list of compiler flags that define the value of c macros.
37 # These usually have the format of -D<flag>, but in this variable, only the
38 # <flag> itself should be listed because the compiler option -D is added
39 # automatically.
40 DEFINITIONS += CLAM_BUILT
41   # simple definition that tells the code that clam is building it.
42
43 ifneq "$(BOOT_STRAPPING)" ""
44   # the software is being built from the ground up, including the binaries
45   # we use for building (like value_tagger and others).
46   DEFINITIONS += BOOT_STRAPPING
47 endif
48
49 # "UNDEFINITIONS" is a list of macros to undefine.
50 #UNDEFINITIONS =
51
52 # GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base
53 # with some branding.  It is provided as a macro definition to all source
54 # files.  The initial value for the macro should come from the build init
55 # file, but if it does not, we pick a default.
56 ifeq "$(product_name)" ""
57   GLOBAL_PRODUCT_NAME := \\\"HOOPLE\\\"
58 else
59   GLOBAL_PRODUCT_NAME := \\\"$(product_name)\\\"
60 endif
61
62 # *_PRODUCT_VERSION records parts of our version numbers for the code to see.
63 DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor)
64
65 # TEST_MAKEFILE tells the preconditions to check that the files specified
66 # in the makefile are actually present.
67 export TEST_MAKEFILE =
68
69 ###############################################################################
70
71 # pseudo-boolean variable section.  if these have any value at all, then they
72 # are treated as being true.  note that these are flags that should generally
73 # be passed on the command line to a make.  if they are intended to be used
74 # from inside a makefile, then they must appear before this file is included.
75
76 # "REBUILD" causes a rebuild of all source files if it is true.
77 export REBUILD
78
79 # "DEBUG" is used to specify a debugging build.  the default is for this to
80 # be false, which causes a release build.
81 export DEBUG
82
83 # Add in a macro definition if debugging is turned on.  This allows us to
84 # easily eliminate code from release builds.
85 ifneq "$(DEBUG)" ""
86   DEFINITIONS += __DEBUGGING__
87 endif
88
89 # "CONSOLE_MODE" causes the program to be generated as a console application.
90 # this is relevant in systems where programs are otherwise built with graphical
91 # user interfaces.  these are always built statically.
92 #CONSOLE_MODE =
93
94 # "OPTIMIZE" creates optimized code.
95 export OPTIMIZE
96
97 # "NO_COMPILE" just runs through the targets without compiling.
98 export NO_COMPILE
99
100 # "BUILD_LIST_FILE" is the set of files that need to be recompiled for
101 # visual c++.
102 export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT)
103
104 # "BUILD_WHACK_FILE" is the set of object files that should be removed if
105 # a build failure occurs.
106 export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT)
107
108 # we are adding the build list to the flag files so we know it gets cleaned up.
109 FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE)
110
111 ###############################################################################
112
113 # This section implements the HOOPLE directory scheme.  If your scheme differs,
114 # then you will want to modify these appropriately.
115
116 # "THIRD_PARTY_DIR" is the root of our support libraries.
117 export THIRD_PARTY_DIR
118 ifeq "$(THIRD_PARTY_DIR)" ""
119   export THIRD_PARTY_DIR := "$(PRODUCTION_STORE)/3rdparty"
120 endif
121
122 # "OUTPUT_ROOT" is the root of all output directories for objects and other
123 # products being built.
124 export OUTPUT_ROOT = $(CLAM_TMP)/objects
125
126 # "PLATFORM_ADD_IN" is an option discriminator for the intended execution
127 # platform.  it should end in an underscore if it is provided.
128 #PLATFORM_ADD_IN = linux_ | w32_
129
130 # "CPU_BUILD_DIR" distinguishes object directories by including the CPU
131 # name and the type of build.
132 ifneq "$(DEBUG)" ""
133   CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)dbg
134 else
135   CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)rel
136 endif
137
138 # "BASE_OUTPUT_PATH" is the parent directory of objects for this type of
139 # CPU and this type of build.
140 export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR)
141
142 # special case when doing arm-linux builds
143 ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX"
144   export TARGETS_STORE = $(FEISTY_MEOW_APEX)/$(CPU_BUILD_DIR)
145   # special output directory for firmware does not include CPU name because
146   #  the repository already include the CPU name
147   BASE_OUTPUT_PATH = $(OUTPUT_ROOT)
148 endif
149
150 # "OUTPUT_PATH" is the directory to generate all compiled products into.
151 export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT)
152
153 # "OBJECT_DIR" is where object files will be stored during compilation for the
154 # target type being produced.
155 export OBJECT_DIR = $(OUTPUT_PATH)
156
157 # These specify where files are to be created or located for our local build.
158 export EXECUTABLE_DIR = $(TARGETS_STORE)
159 export DYNAMIC_LIBRARY_DIR = $(TARGETS_STORE)
160 export STATIC_LIBRARY_DIR = $(TARGETS_STORE)
161
162 # "HEADER_SEARCH_PATH" is where the class interface files are to be found.
163 # the generated store folder is added to access the build version file.
164 # the binaries are added to access the system_helper.h file.
165 HEADER_SEARCH_PATH = $(FEISTY_MEOW_GENERATED_STORE)/versions $(FEISTY_MEOW_BINARIES)
166
167 # "LOCAL_HEADERS" are overrides that go first in the header search path.
168 LOCAL_HEADERS = $(THIRD_PARTY_DIR)
169
170 # "CODEBASE_HEADERS" is a list that can be changed for a particular codebase.
171 # it is guaranteed that clam will not interfere with this list, whereas
172 # the LOCAL_HEADERS can be modified by clam.
173 #CODEBASE_HEADERS =
174
175 # "LOCAL_LIBRARIES" are overrides that go first in the library search path.
176 #LOCAL_LIBRARIES =
177
178 # "LIBRARY_SEARCH_PATH" is where the library files are to be found.
179 #LIBRARY_SEARCH_PATH =
180
181 # "HOOPLE_LIBRARIES" is where our local libraries are located.
182 HOOPLE_LIBRARIES =
183
184 # "EXTRA_COPIES" is a list of files that need to be among the files copied
185 # to a project output folder.
186 export EXTRA_COPIES
187
188 # "EXTRA_VERSIONS" is a list of version files to synchronize with the main
189 # library version for this build.  if a file called "version.ini" exists in
190 # the project directory, then it will automatically be upgraded, so the
191 # extra version files are mainly useful when you have a project with multiple
192 # programs in it and you want them to have independent version files (as you
193 # should perhaps want).
194 export EXTRA_VERSIONS
195
196 # "DEPS_FILE" is where the auto-dependency information is stored.
197 export DEPS_FILE = $(OUTPUT_PATH)/$(PROJECT).deps
198
199 # "NO_DEPS" is an exclusion flag.  if it is defined, then no auto-dependency
200 # files will be generated.  this is useful if you are missing makedep or trying
201 # to compile it...
202 #NO_DEPS = t
203
204 # "OMIT_VERSIONS" is another exclusion flag.  this one turns off the creation
205 # of version resource files and eliminates any references that would include
206 # such files.  this is needed when rebuilding version_stamper.
207 #OMIT_VERSIONS = t
208
209 # add the cleanup values we already know.
210 CLEANUPS += $(OUTPUT_PATH) $(DEPS_FILE)
211
212 SUPPLEMENTAL_CLEANUP_TARGETS = cpp_add_to_cleanups_variable
213
214 # "GENDEPS" is a flag that causes dependencies to be generated into
215 # statically built applications.
216 export GENDEPS
217
218 ###############################################################################
219
220 # "SEARCH_DIRS" is a list of directories that should be searched for both C++
221 # header files and for C++ code libraries.  The items placed in SEARCH_DIRS
222 # are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH.
223 #SEARCH_DIRS =
224
225 # "DEPENDENCY_DEFINITIONS" is a list of extra definitions that only get passed
226 # to the makedep tool.  this can vary for each compiler.
227 #DEPENDENCY_DEFINITIONS =
228
229 # "DEPENDENCY_ADDITIONS" is a set of parameters passed directly to makedep.
230 #DEPENDENCY_ADDITIONS =
231
232 # "DEBUG_FLAGS" these flags are used for generating specialized versions of
233 # object files, such as ones that include debugging code or that add code for
234 # profiling.
235 # Possible values are -g for adding GDB debugging code and -pg for adding
236 # gprof profiling code.
237 #DEBUG_FLAGS = -g
238 #DEBUG_FLAGS = -pg
239 #DEBUG_FLAGS =
240
241 # "COMPILER_FLAGS" are the flags for the pre-processor and compiler.
242 #COMPILER_FLAGS =
243
244 # "STRICT_WARNINGS" turns on all warnings and forces them to be considered
245 # as errors when encountered.
246 #STRICT_WARNINGS = 
247
248 # "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool
249 # that creates static code libraries.
250 #LIBRARIAN_FLAGS =
251
252 # "SOURCE" is the list of files that are turned into objects.
253 #SOURCE=
254
255 # "OBJECTS" are the files to be created by compilation and added to any
256 # libraries or executables that are made.
257 #OBJECTS =
258
259 # "EXTRA_OBJECTS" are files that are created elsewhere but need to be bound
260 # into the target.
261 #EXTRA_OBJECTS =
262
263 # "LIBS_USED" are system or compiler code libraries that the targets to be
264 # created depend upon.
265 LIBS_USED =
266
267 # "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries
268 # actually cause executables and object files to be recompiled when the
269 # libraries specified have changed.  To accomplish this, these libraries MUST
270 # be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place
271 # on the LIBRARY_SEARCH_PATH.
272 #LOCAL_LIBS_USED=
273
274 # Load flags tell the linker and loader how to deal with the files and where
275 # to locate library components.  The prefix goes before object files are
276 # listed, and the suffix after.  The prefix should have things like the
277 # directories to be searched for code libraries (although they should be added
278 # to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic).
279 # In the suffix, actual library loading statements (like -lmath) can be
280 # included (although they should be listed in a different form in LIBS_USED).
281 # Remember that the unix loader looks for functions in libraries in a bizarre
282 # way: ld searches for a function only when it has already been asked for it.
283 # This means that it does not remember what functions it has already been
284 # provided with in the libraries and object files, and it will fail if those
285 # functions are only asked for after they have already been encountered.
286 #LOAD_FLAG_PREFIX =
287 #LOAD_FLAG_SUFFIX =
288
289 # The prefix used on library names, mostly for unix.
290 export LIB_PREFIX
291 # The standard suffix for static or import libraries on this operating system.
292 export LIB_ENDING
293
294 # The dynamic library ending differs between platforms.
295 export DYNLIB_ENDING
296
297 # Flag for specifying the library name to create.
298 #CREATE_LIBRARY_FLAG =
299
300 # Flag for specifying a library to include in linking.
301 LIBRARY_NAME_FLAG = -l
302
303 # Flag for specifying the name of an object file to include in a library or exe.
304 OBJECT_NAME_FLAG = -o
305
306 # Flag for specifying a directory to add to the search path for libs.
307 LIBRARY_PATH_FLAG = -L
308
309 # Flag for specifying the name of an output from the linker.
310 #LINKER_OUTPUT_FLAG =
311
312 # Flag for separating linker options from compilation options for a combined
313 # compiler / linker.
314 #LINKER_OPTION_SEPARATOR =
315
316 # Flag that passes special options when building executable programs.  It is
317 # passed just before the LOAD_FLAG_PREFIX.
318 #EXE_FLAGS = 
319
320 # The name of the compiler tool.
321 #CC =
322
323 # The name of the library creator tool.
324 #LIBRARY_TOOL =
325
326 ifeq "$(OPERATING_SYSTEM)" "WIN32"
327   # the root name of the version file.  This is currently irrelevant on
328   # non-windoze platforms.
329   #CLAM_VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh)
330   #hmmm: also currently irrelevant since we are only doing static builds.
331 endif
332
333 ifneq "$(CONSOLE_MODE)" ""
334   # this definition can be used to signal different behavior when the app is
335   # being built for console mode.  that generally implies that it should send
336   # debugging info to standard out and avoid doing much with graphics.
337   DEFINITIONS += CONSOLE_MODE
338 endif
339
340 ###############################################################################
341
342 # Operating system dependent flags.
343 # (not so OS dependent with move to only gnu compilation...)
344
345 LIB_ENDING = .a
346 DYNLIB_ENDING = .so
347
348 ###############################################################################
349
350 # Compiler Dependent Flags
351 #
352 # "CLAM_COMPILER_ROOT_DIR" is the top-level for the C++ compiler location.
353 # "COMPILER_HEADER_DIR" is where the compiler headers are.
354 # "COMPILER_LIBRARY_DIR" is where archived libraries are.
355 # "CC" is the name of the C++ compiler to be used.
356 export COMPILER_HEADER_DIR
357
358 # These flags may be useful across multiple compilers.
359 #
360 # "USE_SSL" brings in the OpenSSL libraries.
361 #USE_SSL =
362
363 # "USE_CURL" provides access to the curl library.
364 #USE_CURL =
365
366 # "USE_WXWIDGETS" enables wxwidget library support.
367 #USE_WXWIDGETS =
368
369 # "USE_XWIN" specifies that this project needs X window system support.
370 #USE_XWIN =
371
372 ifneq "$(OMIT_VERSIONS)" ""
373   DEFINITIONS += NO_VERSION
374 endif
375
376 ############################################################################
377 # compiler specific section below.
378 ############################################################################
379
380 ifeq "$(CLAM_COMPILER)" "GNU_LINUX"
381   # Unix GNU compiler...
382   CC = g++
383   PLATFORM_ADD_IN = linux_
384   DEFINITIONS += _FILE_OFFSET_BITS=64 
385
386   DEPENDENCY_DEFINITIONS += NO_VERSION
387 #hmmm: uggh, can we clean up this huge list of dep adds somehow?
388   DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu
389
390 #  ifeq "x86_64" "$(CLAM_BASE_CPU)"
391 #    COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64
392 #  else
393 #    COMPILER_LIBRARY_DIR = /lib /usr/lib /usr/local/lib
394 #  endif
395   DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU 
396
397 #hmmm: move to an x win enabling area.
398   # X Window System not enabled by default.
399   #DEFINITIONS += __XWINDOWS__ 
400
401   LIBRARY_TOOL = ar
402   LIB_PREFIX = lib
403   LOAD_FLAG_PREFIX += -Xlinker -O3 
404     # -Xlinker --print-map : shows what went in and why.
405     # -Xlinker -O3 : linker optimization
406
407   CREATE_LIBRARY_FLAG += -r 
408     # space on end is significant.
409   LINKER_OUTPUT_FLAG = -o 
410   LINK_TOOL = g++
411
412   COMPILER_FLAGS += -shared-libgcc -fPIC  
413   # compiler flags for gcc:
414   # -finline-functions: inline functions as needed.
415   # -fPIC: generate position independent code.
416   # -fpic: generate position independent code, but less portable.
417   # -frepo: automatic template instantiation at link time, no implicit ones.
418   # -ffunction-sections: put each function in own section, improving linking.
419   # -fdata-sections: put data in own section, improving linking.
420   # -shared-libgcc: use the shared library version of compiler libraries.
421   # -fno-exceptions: do not support exception handling and stack unwinding.
422
423   ifeq "$(DEBUG)" ""
424 #    COMPILER_FLAGS += -finline-functions 
425   endif
426   ifneq "$(STRICT_WARNINGS)" ""
427     COMPILER_FLAGS += -Wall -Werror -Wextra -Wno-long-long
428   endif
429
430   ifeq "$(CONSOLE_MODE)" ""
431     LIBS_USED += dl 
432      # dl=dynamic library.
433   endif
434
435   LIBS_USED += pthread rt 
436      # pthread=thread libraries.
437      # rt=real time libraries for shared memory.
438
439   ifneq "$(DEBUG)" ""
440     # add in debugging flags.
441     COMPILER_FLAGS += -g3 -O0
442
443 ##LOAD_FLAG_PREFIX += -lefence
444 #electric fence
445
446 ###COMPILER_FLAGS += -pg
447 ###LOAD_FLAG_PREFIX += -pg
448 ####trying out profiling: does not work so well yet.  generates gmon.out files
449 ####  in pretty random places.  the parameters to the linker do not even
450 ####  mention this flag, and the compiler flags do not seem to provide an
451 ####  option for where the file goes.  so, it is on hold.
452
453   endif
454
455 endif
456
457 ############################################################################
458
459 ifeq "$(CLAM_COMPILER)" "GNU_DARWIN"
460   # Darwin kernel GNU compiler...  really more general macos (MacOS) here these days.
461   CC = g++
462   PLATFORM_ADD_IN = darwin
463   DEFINITIONS += _FILE_OFFSET_BITS=64 
464
465   DEPENDENCY_DEFINITIONS += NO_VERSION
466 #  DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include
467   DEPENDENCY_ADDITIONS = -X/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
468
469   COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
470 #/usr/local/include /usr/include 
471 #old /System/Library/Frameworks/Foundation.framework/Versions/C/Headers
472 #/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
473 #/Library/Developer/CommandLineTools/usr/include
474
475 #  ifeq "x86_64" "$(CLAM_BASE_CPU)"
476 #    COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64
477 #  else
478 #    COMPILER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib
479 ##/usr/lib /usr/local/lib
480 #  endif
481
482   DEFINITIONS += UNIX unix __UNIX__ __USE_GNU 
483
484   LIBRARY_TOOL = ar
485   LIB_PREFIX = lib
486   # special flags for getting rid of warnings on fd_set.
487   LOAD_FLAG_PREFIX=-Wl,-U,___darwin_check_fd_set_overflow
488
489   CREATE_LIBRARY_FLAG += -r 
490     # space on end is significant.
491   LINKER_OUTPUT_FLAG = -o 
492   LINK_TOOL = g++
493
494   # mac specific flags
495   COMPILER_FLAGS += -Wno-nullability-completeness
496 #trying this one again, which had been turned off.
497   COMPILER_FLAGS += -fgnu-runtime
498
499   ifneq "$(DEBUG)" ""
500     # add in debugging flags.
501 #    COMPILER_FLAGS += -g3 -O0
502   endif
503 endif
504
505 ############################################################################
506
507 ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX"
508   # ARM-linux GNU compiler...
509
510 ##  CLAM_COMPILER_ROOT_DIR = /usr/local/arm-linux
511 #hmmm: the above is the one we may need to integrate into build_variables.sh
512
513   CC = $(CLAM_COMPILER_ROOT_DIR)/bin/g++
514   PLATFORM_ADD_IN = linux_
515   SNAPGEAR_ROOT_DIR = $(HOME)/snapgear
516   DEPENDENCY_DEFINITIONS += NO_VERSION
517
518   COMPILER_HEADER_DIR = $(SNAPGEAR_ROOT_DIR)/linux-2.4.x/include
519 #  COMPILER_HEADER_DIR += $(SNAPGEAR_ROOT_DIR)/include 
520   COMPILER_HEADER_DIR += $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/lib 
521   COMPILER_HEADER_DIR += /usr/local/lib/gcc-lib/arm-linux/3.3.2/include
522   
523   COMPILER_LIBRARY_DIR = $(SNAPGEAR_ROOT_DIR)/lib $(CLAM_COMPILER_ROOT_DIR)/lib/be
524
525   DEFINITIONS += linux __linux__ unix UNIX __UNIX__ __LINUX__ 
526
527   COMPILER_FLAGS += -mbig-endian -finline-functions -ffunction-sections -fPIC -nostdinc -nostdinc++ 
528   ifneq "$(STRICT_WARNINGS)" ""
529     COMPILER_FLAGS += -Wall -Werror
530   endif
531
532   LIBRARY_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/ar
533   LIB_PREFIX = lib
534   CREATE_LIBRARY_FLAG += -r 
535     # space on end is significant.
536   
537   LINK_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/g++
538   LINKER_OUTPUT_FLAG = -o
539   EXE_FLAGS = -mbig-endian
540   LOAD_FLAG_PREFIX += -v -mbig-endian
541
542   LIBS_USED += pthread dl
543
544   ifneq "$(DEBUG)" ""
545     COMPILER_FLAGS += -g3 -O0
546   endif
547
548 endif
549
550 ############################################################################
551
552 ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS"
553   # GNU compiler for MS Windoze...
554   CC = g++
555 #  RC := $(CLAM_COMPILER_ROOT_DIR)/bin/windres
556   PLATFORM_ADD_IN = w32_
557
558   COMPILER_HEADER_DIR = $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/include/c++/3.4.2 
559 #$(CLAM_COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include 
560 ###$(CLAM_COMPILER_ROOT_DIR)/usr/include/mingw $(CLAM_COMPILER_ROOT_DIR)/usr/include $(CLAM_COMPILER_ROOT_DIR)/usr/include/w32api $(CLAM_COMPILER_ROOT_DIR)/usr/include/extras
561
562   COMPILER_LIBRARY_DIR = $(CLAM_COMPILER_ROOT_DIR)/lib
563   DEFINITIONS += __GNU_WINDOWS__ _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 
564
565   LIBRARY_TOOL = ar
566   LIBRARY_PATH_FLAG = -L 
567   LIB_PREFIX = lib
568   LIB_ENDING = .a
569   LOAD_FLAG_PREFIX += -mwindows
570   CREATE_LIBRARY_FLAG += -r 
571     # space on end is significant.
572   LINKER_OUTPUT_FLAG = -o
573   LINK_TOOL = g++
574   MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-D% )
575   MIDL_DEFS = -no_robust
576   # some lovely definitions used by some of the mfc and other ms code.
577   DEPENDENCY_DEFINITIONS += __cplusplus __MINGW32__ _WIN32 _CHAR_UNSIGNED M_I86 _M_I86 _M_IX86=500 _WIN32_WINNT=0x501 __RPC_WIN32__ __RPCNDR_H_VERSION__ __RPCPROXY_H_VERSION__ TARGET_IS_NT40_OR_LATER PGM_SETCHILD 
578 #hmmm: yuck; re-evaluate need for the above dep defs.
579
580 endif
581
582 ############################################################################
583
584 # these activities are done after the compiler specific stuff.
585
586 # add a definition for programs to be able to differentiate the versions.
587 DEFINITIONS += CLAM_COMPILER_VERSION=$(CLAM_COMPILER_VERSION)
588
589 # set a variable that scripts can use to get most of the definitions.
590 export VARIABLE_DEFINITION_SET := $(DEFINITIONS)
591
592 ###############################################################################
593