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