1SubDir OBOS_TOP src add-ons kernel file_systems bfs ; 2 3# save original optimization level 4oldOPTIM = $(OPTIM) ; 5 6# set some additional defines 7{ 8 local defines = 9 KEEP_WRONG_DIRENT_RECLEN 10 UNSAFE_GET_VNODE 11 #BFS_BIG_ENDIAN_ONLY 12 ; 13 14 # Force the API version to be the R5 one even when compiling 15 # under Dano/Zeta 16 if $(COMPILE_FOR_R5) { 17 defines += COMPILE_FOR_R5 ; 18 } else if $(COMPILE_FOR_ZETA) { 19 defines += COMPILE_FOR_ZETA ; 20 } 21 22 # Enable OpenBFS to be compiled as a full BFS replacement. Will 23 # report itself as "bfs" instead of "obfs" 24 if $(BFS_REPLACEMENT) { 25 defines += BFS_REPLACEMENT ; 26 bfsAddOnName = bfs ; 27 } else { 28 bfsAddOnName = obfs ; 29 } 30 31 if $(DEBUG) = 0 { 32 # the gcc on BeOS doesn't compile BFS correctly with -O2 or more 33 OPTIM = -O1 ; 34 } 35 36 defines = [ FDefines $(defines) ] ; 37 SubDirCcFlags $(defines) -Wall -Wno-multichar ; 38 SubDirC++Flags $(defines) -Wall -Wno-multichar ; 39} 40 41UsePrivateHeaders [ FDirName kernel ] ; # For kernel_cpp.cpp 42 43R5KernelAddon $(bfsAddOnName) : [ FDirName kernel file_systems ] : 44 BlockAllocator.cpp 45 BPlusTree.cpp 46 kernel_cpp.cpp 47 Debug.cpp 48 Index.cpp 49 Inode.cpp 50 Journal.cpp 51 kernel_interface.cpp 52 Query.cpp 53 Utility.cpp 54 Volume.cpp 55 BufferPool.cpp 56 ; 57 58SEARCH on [ FGristFiles 59 kernel_cpp.cpp 60 ] = [ FDirName $(OBOS_TOP) src kernel core util ] ; 61 62#----------------------------------------------------- 63 64rule InstallBFS 65{ 66 Depends $(<) : $(>) ; 67} 68 69actions ignore InstallBFS 70{ 71 cp $(>) /boot/home/config/add-ons/kernel/file_systems/ 72} 73 74InstallBFS install : obfs ; 75 76# restore original optimization level 77OPTIM = $(oldOPTIM) ; 78