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 56SourceHdrs $(muslSources) : 57 [ FDirName $(posixSources) musl include ] 58 [ FDirName $(posixSources) musl internal ] 59 [ FDirName $(posixSources) musl arch $(TARGET_KERNEL_ARCH_DIR) ] ; 60 61KernelMergeObject kernel_lib_posix.o : 62 # main 63 kernel_errno.cpp 64 dirent.cpp 65 fcntl.cpp 66 poll.cpp 67 utime.c 68 # locale 69 ctype_loc.cpp 70 ctype_l.cpp 71 ctype.cpp 72 localeconv.cpp 73 LocaleData.cpp 74 # stdio (this subdir) 75 kernel_vsprintf.cpp 76 # stdlib 77 abs.c 78 atoi.c 79 bsearch.c 80 merge.c 81 qsort.c 82 random.c 83 strtod.c 84 strtol.c 85 strtoll.c 86 strtoul.c 87 strtoull.c 88 # sys 89 chmod.c 90 stat.c 91 mkdir.c 92 select.cpp 93 gettimeofday.c 94 uio.c 95 # time 96 time.c 97 # unistd 98 access.c 99 chown.c 100 close.c 101 #conf.c 102 directory.c 103 dup.c 104 ioctl.c 105 link.c 106 lseek.c 107 mount.c 108 read.c 109 sync.c 110 truncate.c 111 usergroup.cpp 112 write.c 113 # string 114 memchr.c 115 memcmp.c 116 memmem.c 117 memmove.c 118 strcasecmp.c 119 strcasestr.c 120 strcat.c 121 strchr.c 122 strcmp.c 123 strcpy.c 124 strcspn.c 125 strdup.cpp 126 strerror.c 127 strlcat.c 128 strlcpy.c 129 strlen.cpp 130 strncat.c 131 strncmp.c 132 strncpy.cpp 133 strndup.cpp 134 strnlen.cpp 135 strpbrk.c 136 strrchr.c 137 strspn.c 138 strstr.c 139 strtok.c 140 strupr.c 141 stpcpy.c 142 143 $(muslSources) 144 : $(TARGET_KERNEL_PIC_CCFLAGS) 145; 146 147SEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl misc ] ; 148SEARCH on [ FGristFiles $(muslSources) ] += [ FDirName $(posixSources) musl prng ] ; 149 150# misc 151 152SEARCH_SOURCE = 153 [ FDirName $(HAIKU_TOP) src kits support ] 154 [ FDirName $(HAIKU_TOP) src kits shared ] 155 ; 156 157KernelMergeObject kernel_misc.o : 158 DataIO.cpp 159 Referenceable.cpp 160 WeakReferenceable.cpp 161 162 : $(TARGET_KERNEL_PIC_CCFLAGS) 163; 164 165HaikuSubInclude arch $(TARGET_ARCH) ; 166HaikuSubInclude zlib ; 167if [ FIsBuildFeatureEnabled zstd ] { 168 HaikuSubInclude zstd ; 169} 170