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