Forward compatibility: build relative-base link libraries where needed
[AROS.git] / workbench / libs / expat / lib / Makefile.MPW
blob046af005147bd19808fe8eaec318da5ac9f7db43
1 #   File:       Makefile.MPW
2 #   Targets:    All, Dynamic, Static (and Clean, Clean-All)
3 #   Created:    Tuesday, July 02, 2002
5 #   MPW Makefile for building expat under the "classic" (i.e. pre-X) Mac OS
6 #   Copyright © 2002 Daryle Walker
7 #   Portions Copyright © 2002 Thomas Wegner
8 #   See the COPYING file for distribution information
10 #   Description: 
11 #   This Makefile lets you build static, dynamic (i.e. shared) and stub 
12 #   versions of the expat library as well as the elements.c and outline.c 
13 #   examples (built as tools for MPW). This is for PPC only; it should be 
14 #   no problem to build a 68K version of the expat library, though.
16 #       Usage: 
17 #                              Buildprogram All
18 #                        or    Buildprogram Dynamic
19 #                        or    Buildprogram Static
21 #   Note: You first have to rename this file to "Makefile", or the Buildprogram 
22 #         commando will not recognize it.
25 MAKEFILE        = Makefile
26 ¥MondoBuild¥    = {MAKEFILE}  # Make blank to avoid rebuilds when makefile is modified
28 ObjDir          = :
29 SrcDir          = :
30 HdrDir          = :
32 ToolDir         = ::examples:
34 Includes        = -i {HdrDir}
36 Sym-PPC         = -sym off
38 Defines         = -d MACOS_CLASSIC
40 PPCCOptions     = {Includes} {Sym-PPC} -w 35 {Defines}
42 FragName        = libexpat
45 ### Source Files ###
47 SrcFiles        =  ¶
48                                   "{SrcDir}xmlparse.c" ¶
49                                   "{SrcDir}xmlrole.c" ¶
50                                   "{SrcDir}xmltok.c"
52 ToolSrcFiles    =  ¶
53                                   "{ToolDir}elements.c" ¶
54                                   "{ToolDir}outline.c"
57 ### Object Files ###
59 ObjFiles-PPC    =  ¶
60                                   "{ObjDir}xmlparse.c.o" ¶
61                                   "{ObjDir}xmlrole.c.o" ¶
62                                   "{ObjDir}xmltok.c.o"
64 ElementToolObjFile   =  "{ObjDir}elements.c.o"
66 OutlineToolObjFile   =  "{ObjDir}outline.c.o"
69 ### Libraries ###
71 StLibFiles-PPC    =  ¶
72                                   "{PPCLibraries}StdCRuntime.o" ¶
73                                   "{PPCLibraries}PPCCRuntime.o" ¶
74                                   "{PPCLibraries}PPCToolLibs.o"
76 ShLibFiles-PPC    =  ¶
77                                   "{SharedLibraries}InterfaceLib" ¶
78                                   "{SharedLibraries}StdCLib" ¶
79                                   "{SharedLibraries}MathLib"
81 LibFiles-PPC    =  ¶
82                                   {StLibFiles-PPC} ¶
83                                   {ShLibFiles-PPC}
86 ### Special Files ###
88 ExportFile      = "{ObjDir}{FragName}.exp"
90 StLibFile       = "{ObjDir}{FragName}.MrC.o"
92 ShLibFile       = "{ObjDir}{FragName}"
94 StubFile        = "{ObjDir}{FragName}.stub"
96 ElementsTool    = "{ToolDir}elements"
98 OutlineTool     = "{ToolDir}outline"
101 ### Default Rules ###
103 .c.o  Ä  .c  {¥MondoBuild¥}
104         {PPCC} {depDir}{default}.c -o {targDir}{default}.c.o {PPCCOptions}
107 ### Build Rules ###
109 All  Ä  Dynamic {ElementsTool} {OutlineTool}
111 Static  Ä  {StLibFile}
113 Dynamic  Ä  Static {ShLibFile} {StubFile}
115 {StLibFile}  ÄÄ  {ObjFiles-PPC} {StLibFiles-PPC} {¥MondoBuild¥}
116         PPCLink ¶
117                 -o {Targ} ¶
118                 {ObjFiles-PPC} ¶
119                 {StLibFiles-PPC} ¶
120                 {Sym-PPC} ¶
121                 -mf -d ¶
122                 -t 'XCOF' ¶
123                 -c 'MPS ' ¶
124                 -xm l
126 {ShLibFile}  ÄÄ  {StLibFile} {ShLibFiles-PPC} {ExportFile} {¥MondoBuild¥}
127         PPCLink ¶
128                 -o {Targ} ¶
129                 {StLibFile} ¶
130                 {ShLibFiles-PPC} ¶
131                 {Sym-PPC} ¶
132                 -@export {ExportFile} ¶
133                 -fragname {FragName} ¶
134                 -mf -d ¶
135                 -t 'shlb' ¶
136                 -c '????' ¶
137                 -xm s
139 {StubFile}  ÄÄ  {ShLibFile} {¥MondoBuild¥}
140         shlb2stub -o {Targ} {ShLibFile}
142 {ElementsTool}  ÄÄ  {ElementToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥}
143         PPCLink ¶
144                 -o {Targ} ¶
145                 {ElementToolObjFile} ¶
146                 {StLibFile} ¶
147                 {LibFiles-PPC} ¶
148                 {Sym-PPC} ¶
149                 -mf -d ¶
150                 -t 'MPST' ¶
151                 -c 'MPS '
153 {OutlineTool}  ÄÄ  {OutlineToolObjFile} {StubFile} {LibFiles-PPC} {¥MondoBuild¥}
154         PPCLink ¶
155                 -o {Targ} ¶
156                 {OutlineToolObjFile} ¶
157                 {StLibFile} ¶
158                 {LibFiles-PPC} ¶
159                 {Sym-PPC} ¶
160                 -mf -d ¶
161                 -t 'MPST' ¶
162                 -c 'MPS '
165 ### Special Rules ###
167 {ExportFile}  ÄÄ  "{HdrDir}expat.h" {¥MondoBuild¥}
168         StreamEdit -d ¶
169                 -e "/¥('XMLPARSEAPI('Å') ')Ç0,1È'XML_'([A-Za-z0-9_]+)¨1'('/ Print 'XML_' ¨1" ¶
170                 "{HdrDir}expat.h" > {Targ}
173 ### Required Dependencies ###
175 "{ObjDir}xmlparse.c.o"  Ä  "{SrcDir}xmlparse.c"
176 "{ObjDir}xmlrole.c.o"  Ä  "{SrcDir}xmlrole.c"
177 "{ObjDir}xmltok.c.o"  Ä  "{SrcDir}xmltok.c"
179 "{ObjDir}elements.c.o"  Ä "{ToolDir}elements.c"
180 "{ObjDir}outline.c.o"  Ä "{ToolDir}outline.c"
183 ### Optional Dependencies ###
184 ### Build this target to clean out generated intermediate files. ###
186 Clean  Ä
187         Delete {ObjFiles-PPC} {ExportFile} {ElementToolObjFile} {OutlineToolObjFile}
189 ### Build this target to clean out all generated files. ###
191 Clean-All  Ä  Clean
192         Delete {StLibFile} {ShLibFile} {StubFile} {ElementsTool} {OutlineTool}
194 ### Build this target to generate "include file" dependencies. ###
196 Dependencies  Ä  $OutOfDate
197         MakeDepend ¶
198                 -append {MAKEFILE} ¶
199                 -ignore "{CIncludes}" ¶
200                 -objdir "{ObjDir}" ¶
201                 -objext .o ¶
202                 {Defines} ¶
203                 {Includes} ¶
204                 {SrcFiles}