1SubDir HAIKU_TOP src system kernel lib ; 2 3UsePrivateHeaders shared ; 4UsePrivateHeaders [ FDirName libroot locale ] ; 5UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility gnu ] : true ; 6 7# force inclusion of kernel_lib.h 8local kernelLibHeader = [ FDirName $(SUBDIR) kernel_lib.h ] ; 9CCFLAGS += -include $(kernelLibHeader) ; 10C++FLAGS += -include $(kernelLibHeader) ; 11 12 13local gnuSources = [ FDirName $(HAIKU_TOP) src libs gnu ] ; 14local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ; 15local librootOSSources = [ FDirName $(librootSources) os ] ; 16local posixSources = [ FDirName $(librootSources) posix ] ; 17 18 19# kernel libroot os files 20 21local sources = 22 driver_settings.cpp 23 find_directory.cpp 24 fs_info.cpp 25 system_revision.c 26 wait_for_objects.cpp 27 ; 28 29SourceHdrs $(sources) : $(librootOSSources) ; 30 31KernelMergeObject kernel_os_main.o : $(sources) 32 : $(TARGET_KERNEL_PIC_CCFLAGS) 33; 34 35SEARCH on [ FGristFiles $(sources) ] 36 = [ FDirName $(HAIKU_TOP) src system libroot os ] ; 37 38# kernel libroot posix files 39 40SEARCH_SOURCE += [ FDirName $(posixSources) ] ; 41SEARCH_SOURCE += [ FDirName $(posixSources) locale ] ; 42SEARCH_SOURCE += [ FDirName $(posixSources) stdio ] ; 43SEARCH_SOURCE += [ FDirName $(posixSources) stdlib ] ; 44SEARCH_SOURCE += [ FDirName $(posixSources) string ] ; 45SEARCH_SOURCE += [ FDirName $(posixSources) sys ] ; 46SEARCH_SOURCE += [ FDirName $(posixSources) time ] ; 47SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ; 48SEARCH_SOURCE += [ FDirName $(gnuSources) ] ; 49 50local muslSources = 51 ffs.c 52 rand.c 53 rand_r.c 54 55 strchrnul.c 56 strcspn.c 57 ; 58 59SourceHdrs $(muslSources) : 60 [ FDirName $(posixSources) musl include ] 61 [ FDirName $(posixSources) musl internal ] 62 [ FDirName $(posixSources) musl arch $(TARGET_KERNEL_ARCH_DIR) ] ; 63 64KernelMergeObject kernel_lib_posix.o : 65 kernel_errno.cpp 66 kernel_vsprintf.cpp 67 stack_protector.cpp 68 69 # main 70 dirent.cpp 71 fcntl.cpp 72 poll.cpp 73 utime.c 74 # locale 75 ctype_loc.cpp 76 ctype_l.cpp 77 ctype.cpp 78 localeconv.cpp 79 LocaleData.cpp 80 # stdlib 81 abs.c 82 atoi.c 83 bsearch.c 84 merge.c 85 qsort.c 86 random.c 87 strtod.c 88 strtol.c 89 strtoll.c 90 strtoul.c 91 strtoull.c 92 # sys 93 chmod.c 94 stat.c 95 mkdir.c 96 select.cpp 97 gettimeofday.c 98 uio.c 99 # time 100 time.c 101 # unistd 102 access.c 103 chown.c 104 close.c 105 #conf.c 106 directory.c 107 dup.c 108 ioctl.c 109 link.c 110 lseek.c 111 mount.c 112 read.c 113 sync.c 114 truncate.c 115 usergroup.cpp 116 write.c 117 # string 118 memchr.c 119 memcmp.c 120 memmem.c 121 memmove.c 122 strcasecmp.c 123 strcasestr.c 124 strcat.c 125 strchr.c 126 strcmp.c 127 strcpy.c 128 strdup.cpp 129 strerror.c 130 strlcat.c 131 strlcpy.c 132 strlen.cpp 133 strncat.c 134 strncmp.c 135 strncpy.cpp 136 strndup.cpp 137 strnlen.cpp 138 strpbrk.c 139 strrchr.c 140 strspn.c 141 strstr.c 142 strtok.c 143 strupr.c 144 stpcpy.c 145 146 $(muslSources) 147 : $(TARGET_KERNEL_PIC_CCFLAGS) 148; 149 150SEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl misc ] ; 151SEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl prng ] ; 152SEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl string ] ; 153 154# misc 155 156SEARCH_SOURCE = 157 [ FDirName $(HAIKU_TOP) src kits support ] 158 [ FDirName $(HAIKU_TOP) src kits shared ] 159 ; 160 161KernelMergeObject kernel_misc.o : 162 DataIO.cpp 163 Referenceable.cpp 164 WeakReferenceable.cpp 165 166 : $(TARGET_KERNEL_PIC_CCFLAGS) 167; 168 169HaikuSubInclude arch $(TARGET_ARCH) ; 170HaikuSubInclude zlib ; 171if [ FIsBuildFeatureEnabled zstd ] { 172 HaikuSubInclude zstd ; 173} 174