From efaa1f0e735fa2f93dbc0398f9dec19c36225a7f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 3 Mar 2005 23:35:57 +0000 Subject: [PATCH] We now build a static library from the fs_shell sources. No need to compile them again for each FS. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11567 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/fs_shell/Jamfile | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/Jamfile b/src/tests/add-ons/kernel/file_systems/fs_shell/Jamfile index 722f8c652b..968218ee7d 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/Jamfile @@ -1,5 +1,48 @@ SubDir OBOS_TOP src tests add-ons kernel file_systems fs_shell ; +include [ FDirName $(OBOS_TOP) src tests add-ons kernel file_systems fs_shell + FSShellRules ] ; + +# We compile the fs_shell in a mixed environment: We use the platform POSIX +# and STL headers (to have a proper interface to use), and we use all other +# BeOS specific headers. Ideally we would get rid of the latter, but we still +# have dependencies to them. + +SetupFSShellIncludes ; + +rule BuildLibFSShell +{ + SetupObjectsDir ; + + # Remove `-nostdinc' from CCFLAGS and C++FLAGS. + local oldCCFLAGS = $(CCFLAGS) ; + local oldC++FLAGS = $(C++FLAGS) ; + CCFLAGS = [ Filter $(CCFLAGS) : -nostdinc ] ; + C++FLAGS = [ Filter $(C++FLAGS) : -nostdinc ] ; + + Objects $(2) ; + LibraryFromObjects $(1) : $(2:S=$(SUFOBJ)) ; + + ObjectsDefines $(2) : _NO_INLINE_ASM ; + + # Reset CCFLAGS and C++FLAGS to original values. + CCFLAGS = $(oldCCFLAGS) ; + C++FLAGS = $(oldC++FLAGS) ; +} + +{ + local defines = [ FDefines USER DEBUG ] ; + SubDirCcFlags $(defines) ; + SubDirC++Flags $(defines) -fno-exceptions -fno-rtti ; +} + +BuildLibFSShell libfs_shell.a + : + fsh.cpp rootfs.c initfs.c kernel.c cache.c external_commands.cpp sl.c + stub.c tracker.cpp sysdep.c hexdump.c argv.c errors.cpp +; + + local fsShellCommandSources ; if $(OS) = BEOS { fsShellCommandSources = fs_shell_command_beos.cpp ;