xref: /haiku/src/libs/stdc++/legacy/Jamfile (revision 040a81419dda83d1014e9dc94936a4cb3f027303)
1SubDir HAIKU_TOP src libs stdc++ legacy ;
2
3local architectureObject ;
4for architectureObject in [ MultiArchSubDirSetup x86_gcc2 ] {
5	on $(architectureObject) {
6		local architecture = $(TARGET_PACKAGING_ARCH) ;
7
8		# disable undesired warnings, and add some required C++ flags
9		CCFLAGS += -Wno-missing-prototypes ;
10		C++FLAGS += -nostdinc++ -fno-implicit-templates -Wno-sign-compare
11			-fpic ;
12
13		# define header-searchpaths all by ourselves, as including system headers
14		# messes things up:
15		# use the following paths to make use of the headers contained in glibc,
16		# but this doesn't work yet, as the libio we are using here and the one
17		# contained in our libroot are different versions.
18		local glibcDir
19			= [ FDirName $(HAIKU_TOP) src system libroot posix glibc ] ;
20		SYSHDRS =
21			$(SUBDIR)
22			[ FDirName $(glibcDir) libio ]
23			[ FDirName $(glibcDir) stdlib ]
24			[ FDirName $(glibcDir) stdio-common ]
25			[ FDirName $(glibcDir) include ]
26			[ FDirName $(glibcDir) include arch x86 ]
27			[ FDirName $(HAIKU_TOP) headers cpp ]
28			$(glibcDir)
29			[ FDirName $(HAIKU_TOP) headers posix ]
30			[ FDirName $(HAIKU_TOP) headers os ]
31			[ FDirName $(HAIKU_TOP) headers os kernel ]
32			[ FDirName $(HAIKU_TOP) headers os storage ]
33			[ FDirName $(HAIKU_TOP) headers os support ]
34			$(HAIKU_GCC_HEADERS_DIR_x86_gcc2)
35				# so that include_next will work
36			;
37
38		UsePrivateHeaders libroot ;
39
40		# some source-files generate several different objects, depending on
41		# the defines that are used during the compilation call.
42		# So we explicitly state each of these (with their respective defines):
43		rule GenerateStdC++Object
44		{
45			# GenerateStdC++Object <object> : <source> : <defines> ;
46			local object = [ FGristFiles $(1) ] ;
47			local sources = $(2) ;
48			local defines = $(3) ;
49
50			if $(object) {
51				Object $(object) : $(sources) ;
52				ObjectDefines $(object) : $(defines) ;
53			} else {
54				Objects $(sources) ;
55				ObjectDefines $(sources) : $(defines) ;
56			}
57		}
58
59		GenerateStdC++Object cstrio.o
60			: sinst.cc
61			: C EXTRACT INSERT GETLINE
62			;
63
64		GenerateStdC++Object cstrmain.o
65			: sinst.cc
66			: C REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC EQSS EQPS EQSP
67				NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP LESS LEPS LESP GESS
68				GEPS GESP ;
69
70		GenerateStdC++Object dcomio.o
71			: cinst.cc
72			: D EXTRACT INSERT ;
73
74		GenerateStdC++Object dcomplex.o
75			: cinst.cc
76			: D MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC
77				DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG
78				POLAR CONJ NORM COS  COSH EXP LOG POWCC POWCF POWCI POWFC SIN
79				SINH SQRT ;
80
81		GenerateStdC++Object fcomio.o
82			: cinst.cc
83			: F EXTRACT INSERT ;
84
85		GenerateStdC++Object fcomplex.o
86			: cinst.cc
87			: F MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC
88				DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG
89				POLAR CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN
90				SINH SQRT ;
91
92		GenerateStdC++Object ldcomio.o
93			: cinst.cc
94			: LD EXTRACT INSERT ;
95
96		GenerateStdC++Object ldcomplex.o
97			: cinst.cc
98			: LD MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC
99				DIVCC DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS
100				ARG POLAR CONJ NORM COS  COSH EXP LOG POWCC POWCF POWCI POWFC
101				SIN SINH SQRT ;
102
103		# generate standard objects through our new rule, too:
104		GenerateStdC++Object
105			:  cmathi.cc
106				cstdlibi.cc
107				cstringi.cc
108				stdexcepti.cc ;
109
110		# c++ parts from libio:
111		GenerateStdC++Object
112			: 	builtinbuf.cc
113				editbuf.cc
114				filebuf.cc
115				fstream.cc
116				indstream.cc
117				ioassign.cc
118				ioextend.cc
119				iomanip.cc
120				iostream.cc
121				isgetline.cc
122				isgetsb.cc
123				isscan.cc
124				osform.cc
125				parsestream.cc
126				pfstream.cc
127				PlotFile.cc
128				procbuf.cc
129				sbform.cc
130				sbgetline.cc
131				sbscan.cc
132				SFile.cc
133				stdexcepti.cc
134				stdiostream.cc
135				stdstrbufs.cc
136				stdstreams.cc
137				stlinst.cc
138				stream.cc
139				streambuf.cc
140				strstream.cc ;
141
142		# stuff imported from libiberty:
143		GenerateStdC++Object
144			: basename.c getpagesize.c insque.c sigsetmask.c strerror.c
145				vfork.c ;
146
147		SharedLibraryFromObjects libstdc++.r4.so :
148			basename.o
149			builtinbuf.o
150			cmathi.o
151			cstdlibi.o
152			cstringi.o
153			cstrio.o
154			cstrmain.o
155			dcomio.o
156			dcomplex.o
157			editbuf.o
158			fcomio.o
159			fcomplex.o
160			filebuf.o
161			fstream.o
162			getpagesize.o
163			indstream.o
164			insque.o
165			ioassign.o
166			ioextend.o
167			iomanip.o
168			iostream.o
169			isgetline.o
170			isgetsb.o
171			isscan.o
172			ldcomio.o
173			ldcomplex.o
174			osform.o
175			parsestream.o
176			pfstream.o
177			PlotFile.o
178			procbuf.o
179			sbform.o
180			sbgetline.o
181			sbscan.o
182			SFile.o
183			sigsetmask.o
184			stdexcepti.o
185			stdiostream.o
186			stdstrbufs.o
187			stdstreams.o
188			stlinst.o
189			stream.o
190			streambuf.o
191			strerror.o
192			strstream.o
193			vfork.o ;
194	}
195}
196