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