[7] | 1 | #
|
---|
| 2 | # This is a sample implementation for a setup.in file
|
---|
| 3 | # which should reside in the directory pointed to by
|
---|
| 4 | # $(PROJECT_BASE_DIR).
|
---|
| 5 | #
|
---|
| 6 |
|
---|
| 7 | # HELPERS_OUTPUT_DIR: where to put the *.obj and *.lib files;
|
---|
| 8 | # this gets created if it doesn't exist
|
---|
| 9 | HELPERS_OUTPUT_DIR = $(PROJECT_BASE_DIR)\bin
|
---|
| 10 |
|
---|
| 11 | # extend include path; this must include the helpers "include"
|
---|
| 12 | # directory (the parent of include\helpers)
|
---|
| 13 | INCLUDE = $(PROJECT_BASE_DIR)\include;$(INCLUDE)
|
---|
| 14 |
|
---|
| 15 | # COMPILER SETUP
|
---|
| 16 | # --------------
|
---|
| 17 |
|
---|
| 18 | CC_WARNINGS = /w3 /Wcmp+ /Wcnd- /Wcns+ /Wcnv+ /Wgen /Wcns /Wcpy /Wobs /Word- /Wpro /Wrea /Wret /Wtru
|
---|
| 19 |
|
---|
[35] | 20 | CC_HELPERS = icc $(CC_WARNINGS) /c /q+ /se /ss /gm+
|
---|
[7] | 21 |
|
---|
[35] | 22 | # Some VisualAge C++ compiler options explained [default in brackets]:
|
---|
| 23 | # /c: compile only, no link (we'll call the linker explicitly)
|
---|
| 24 | # /fi+: precompile header files [/fe-]
|
---|
| 25 | # /g3|4|5: optimize for 386/486/Pentium [/g3]
|
---|
| 26 | # /gd-: link runtime statically [/gd-]
|
---|
| 27 | # /ge-: create DLL code [/ge+]
|
---|
| 28 | # This switches between EXE and DLL initialization code
|
---|
| 29 | # for the .OBJ file. /ge+ is only needed when the object
|
---|
| 30 | # file contains a main() function. For libraries to be
|
---|
| 31 | # used either with EXE's or DLL's, use /ge+.
|
---|
| 32 | # /gh+: generate profiling hooks for VAC profiler
|
---|
| 33 | # /gi+: fast integer execution
|
---|
| 34 | # /Gl+: remove unreferenced functions (when comp.+link in 1 step)
|
---|
| 35 | # /gm+: multithread libraries
|
---|
| 36 | # /gm+: disable stack probes (single-thread only!)
|
---|
| 37 | # /kc+: produce preprocessor warnings
|
---|
| 38 | # /o+: optimization (inlining etc.)
|
---|
| 39 | # /oi-: no inlining (?)
|
---|
| 40 | # /ol+: use intermediate linker; do _not_ use with debug code
|
---|
| 41 | # /q+: suppress icc logo
|
---|
| 42 | # /Re : don't use subsystem libraries (!= Rn)
|
---|
| 43 | # /se: all language extensions
|
---|
| 44 | # /si+: allow use of precompiled header files
|
---|
| 45 | # /ss: allow double slashes comments in C too
|
---|
| 46 | # /ti+: debug code
|
---|
| 47 | # /tdp: compile everything as C++, even if it has a .C suffix
|
---|
| 48 | # /tm: use debug memory management (malloc etc.)
|
---|
| 49 | # /tn: add source line numbers to object files (for mapfile); a subset of /ti+
|
---|
| 50 | # /Wcls: class problems
|
---|
| 51 | # /Wcnd: conditional exprs problems (= / == etc.)
|
---|
| 52 | # /Wcmp: possible unsigned comparison redundancies
|
---|
| 53 | # /Wcns: operations involving constants
|
---|
| 54 | # /Wcnv: conversions
|
---|
| 55 | # /Wcpy: copy constructor problems
|
---|
| 56 | # /Weff: statements with no effect (annoying)
|
---|
| 57 | # /Wgen: generic debugging msgs
|
---|
| 58 | # /Wobs: obsolete features
|
---|
| 59 | # /Word: unspecified evaluation order
|
---|
| 60 | # /Wpar: list non-referenced parameters (annoying)
|
---|
| 61 | # /Wppc: list possible preprocessor problems (.h dependencies)
|
---|
| 62 | # /Wpro: warn if funcs have not been prototyped
|
---|
| 63 | # /Wrea: mark code that cannot be reached
|
---|
| 64 | # /Wret: check consistency of return levels
|
---|
| 65 | # /Wuni: uninitialized variables
|
---|
| 66 | # /Wuse: unused variables
|
---|
| 67 | # /w2: produce error and warning messages, but no infos
|
---|
[7] | 68 |
|
---|
[35] | 69 | # LINK OPTIONS
|
---|
| 70 | # ------------
|
---|
| 71 | #
|
---|
| 72 | # Link macro. This is used for final linking.
|
---|
| 73 | # If we're supposed to do the release version, we'll turn
|
---|
| 74 | # off debugging and optimize and pack the resulting files.
|
---|
| 75 | #
|
---|
| 76 | # No need to change this. Change the variables above instead.
|
---|
| 77 |
|
---|
| 78 | LINK_BASE = ilink /nologo /noe /map:$(@B).map /linenumbers
|
---|
| 79 |
|
---|
| 80 | !ifdef XWP_DEBUG
|
---|
| 81 | LINK = $(LINK_BASE) /debug
|
---|
| 82 | LINK_ALWAYSPACK = $(LINK_BASE) /exepack:2
|
---|
| 83 | !else
|
---|
| 84 | LINK = $(LINK_BASE) /exepack:2
|
---|
| 85 | LINK_ALWAYSPACK = $(LINK)
|
---|
| 86 | #/packcode /packdata
|
---|
| 87 | # /optfunc
|
---|
| 88 | !endif
|
---|
| 89 |
|
---|