]> git.saurik.com Git - wxWidgets.git/blame - docs/metrowerks/mwvars.sh
define _HPUX_SOURCE under HP-UX, otherwise many things are not defined in standard...
[wxWidgets.git] / docs / metrowerks / mwvars.sh
CommitLineData
6ecd355e
DE
1# File: mwvars.sh
2# Author: David Elliott
3# Id: $Id$
4CWINSTALL="/Applications/Metrowerks CodeWarrior 8.0/Metrowerks CodeWarrior"
5if ! test -d "$CWINSTALL"; then
6 CWINSTALL="$HOME/Applications/Metrowerks CodeWarrior 8.0/Metrowerks CodeWarrior"
7fi
8if ! test -d "$CWINSTALL"; then
9 echo "WARNING: Could not find CodeWarrior" 1>&2
10fi
11
12# NOTE: Do not use this with CW < 9.3
13# If you do have CW 9.3, please read the documentation.before
14# attempting this as I don't have it so haven't tested it.
15#CW_NEXT_ROOT="/Developer/SDKs/MacOSX10.2.8.sdk"
16CW_NEXT_ROOT=""
17
18# Turn this on to use MW's CRT instead of BSD CRT.w/ mwcc/mwld
19CW_MWCC_USE_MW_CRT=no
20# NOTE: When you turn this on you MUST define _MSL_USING_MW_C_HEADERS
21# You probably also want to define _MSL_NEEDS_EXTRAS (for strcasecmp)
22# Furthermore, you can't use UNIXy stuff like popen when you use these!
23# That is why it is off by default.
24
25###########################################################################
26## Metrowerks Mac OS X and Mach-O
27
28##### MWCMachPPCIncludes #####
29# Path containing machine/ansi.h fixed to work with Panther headers
30# standard /usr/include directory
31# MSL C++ headers
32# MSL C headers (MSL C++ needs this for mslGlobals.h in particular)
33# MW compiler specific headers
34export MWCMachPPCIncludes=\
35"$CWINSTALL/MacOS X Support/Headers/(wchar_t Support Panther fix):"\
36"$CW_NEXT_ROOT/usr/include:"\
37"$CWINSTALL/MSL/MSL_C++/MSL_Common/Include:"\
38"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Include:"\
39"$CWINSTALL/MSL/MSL_C/MSL_Common/Include:"\
40"$CWINSTALL/MacOS X Support/Headers/PPC Specific:"\
41 #end MWCMachPPCIncludes
42
43##### MWCMacOSXPPCIncludes #####
44# If using BSD CRT then our includes are like those for the Mach-O compiler.
45export MWCMacOSXPPCIncludes="$MWCMachPPCIncludes"
46if test "x$CW_MWCC_USE_MW_CRT" = "xyes"; then
47# Path containing machine/ansi.h fixed to work with Panther headers
48# MSL C++ and C headers
49# standard /usr/include directory
50# MSL Extra headers (extras.h defines strcasecmp!)
51# MW compiler specific headers
52#NOTE: MSL Extras must be included after /usr/include so mode_t
53# doesn't get redefined incorrectly for OS X.
54 export MWCMacOSXPPCIncludes=\
55"$CWINSTALL/MacOS X Support/Headers/(wchar_t Support Panther fix):"\
56"$CWINSTALL/MSL/MSL_C++/MSL_Common/Include:"\
57"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Include:"\
58"$CWINSTALL/MSL/MSL_C/MSL_Common/Include:"\
59"$CW_NEXT_ROOT/usr/include:"\
60"$CWINSTALL/MSL/MSL_Extras/MSL_Common/Include:"\
61"$CWINSTALL/MacOS X Support/Headers/PPC Specific"
62 #end MWCMacOSXPPCIncludes
63fi
64
65##### MWMacOSXPPCLibraries #####
66# First we must have the path containing mwcrt1.o (see note)
67# Then we have the normal /usr/lib.
68#
69# NOTE: For CW 8.3 users using Panther you must link mwcrt1.o to crt1.o
70# so that the crt1.o from /usr/lib does not get used.
71export MWMacOSXPPCLibraries=\
72"$CWINSTALL/MacOS X Support/Libraries/Startup:"\
73"$CW_NEXT_ROOT/usr/lib"
74 #end MWMacOSXPPCLibraries
75
76##### MWMachPPCLibraries #####
77# Mach-O/PPC linker uses the same system library path as Mac OS X/PPC
78export MWMachPPCLibraries="$MWMacOSXPPCLibraries"
79
80##### MWMachPPCLibraryFiles #####
81# First we need the MSL Runtime for basic C++ support.
82# Second we need the MSL C++ library.
83# There doesn't appear to be any MSL C for this configuration.
84export MWMachPPCLibraryFiles=\
85"$CWINSTALL/MacOS X Support/Libraries/Runtime/Libs/MSL_Runtime_Mach-O.a:"\
86"$CWINSTALL/MSL/MSL_C++/MSL_MacOS/Lib/Mach-O/MSL_C++_Mach-O.a:"\
87 #end MWMachPPCLibraryFiles
88
89
90##### MWMacOSXPPCLibraryFiles #####
91export MWMacOSXPPCLibraryFiles="$MWMachPPCLibraryFiles"
92if test "x$CW_MWCC_USE_MW_CRT" = "xyes"; then
93# First of all we need the MSL Runtime which appears to implement
94# the very basic C++ functions like operator new/delete as well
95# as Metrowerks C++ standard RTTI.
96# Second we need the MSL C++ library.
97# Since we're using MSL C++ library we also need the C library.
98# Finally, we need the console_OS_X.c file which you'll need to compile
99# for this to work (a normal project would have console_OS_X.c in it)
100 export MWMacOSXPPCLibraryFiles=\
101"$CWINSTALL/MacOS X Support/Libraries/Runtime/Libs/MSL_Runtime_Mach-O.lib:"\
102"$CWINSTALL/MSL/MSL_C++/MSL_MacOS/Lib/Mach-O/MSL_C++_Mach-O.lib:"\
103"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Lib/Mach-O/MSL_C_Mach-O.lib:"\
104"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Src/console_OS_X.c.o:"\
105 #end MWMacOSXPPCLibraryFiles
106fi
107
108##### MWFrameworkPaths #####
109# We need /System/Library/Frameworks for the OS X stuff
110export MWFrameworkPaths=\
111"$CW_NEXT_ROOT/System/Library/Frameworks"
112 #end MWFrameworkPaths
113
114
115###########################################################################
116## PEF
117export MWPEFCIncludes=\
118"$CWINSTALL/MSL/MSL_C++/MSL_Common/Include:"\
119"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Include:"\
120"$CWINSTALL/MSL/MSL_C/MSL_Common/Include:"\
121"$CWINSTALL/MSL/MSL_Extras/MSL_Common/Include:"\
122"$CWINSTALL/MSL/MSL_Extras/MSL_MacOS/Include:"\
123"$CWINSTALL/MacOS Support/Headers/PPC Specific:"\
124"$CWINSTALL/MacOS Support/Universal/Interfaces/CIncludes:"\
125"$CWINSTALL/MacOS Support/MetroNub Utilities/:"\
126 #end MWPEFCIncludes
127
128export MWPEFLibraries=\
129"$CWINSTALL"/MacOS\ Support/Universal/Libraries/StubLibraries:\
130"$CWINSTALL"/MacOS\ Support/Libraries/Runtime/Libs:\
131"$CWINSTALL"/MSL/MSL_C/MSL_MacOS/Lib/PPC:\
132"$CWINSTALL"/MSL/MSL_C++/MSL_MacOS/Lib/PPC
133 #end MWPEFLibraries
134
135export MWPEFLibraryFiles=\
136"$CWINSTALL/MacOS Support/Libraries/Runtime/Libs/MSL_All_Carbon.Lib:"\
137"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Src/console.stubs.o:"\
138"$CWINSTALL/MacOS Support/MetroNub Utilities/MNU Carbon.Lib:"\
139"CarbonLib:"\
140"CarbonFrameworkLib:"\
141 #end MWPEFLibraryFiles
142# I don't need the following but here they are for reference:
143#"$CWINSTALL/MacOS Support/Libraries/Runtime/Libs/MSL_StdCRuntime_PPC.lib:"\
144#"$CWINSTALL/MacOS Support/Libraries/Runtime/Libs/MSL_Runtime_PPC.lib:"\
145#"$CWINSTALL/MSL/MSL_C++/MSL_MacOS/Lib/PPC/MSL_C++_PPC.lib:"\
146#"$CWINSTALL/MSL/MSL_C/MSL_MacOS/Lib/PPC/MSL_C_PPC.lib:"\
147