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