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