xref: /haiku/src/tools/fat_shell/Jamfile (revision 68d37cfb3a755a7270d772b505ee15c8b18aa5e0)
1SubDir HAIKU_TOP src tools fat_shell ;
2
3SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems fat ] ;
4
5# prevent inclusion of HaikuBuildCompatibility.h and BSD headers
6DEFINES += HAIKU_BUILD_COMPATIBILITY_H __STRICT_ANSI__ ;
7
8# set some additional defines
9{
10	local defines =
11		FS_SHELL
12		;
13
14	if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
15		# GCC2 doesn't compile BFS correctly with -O2 or more
16		OPTIM = -O1 ;
17	}
18
19	defines = [ FDefines $(defines) ] ;
20
21	local c++flags = ;
22	if $(HOST_CC_IS_LEGACY_GCC) != 1 {
23		c++flags += -std=c++11 ;
24	}
25
26	SubDirCcFlags $(defines) -Wno-multichar ;
27	SubDirC++Flags $(defines) -Wno-multichar -fno-rtti ;
28	SubDirC++Flags $(defines) $(c++flags) -Wno-multichar -fno-rtti ;
29}
30
31# platform specific libraries
32local fsShellCommandLibs ;
33if ! $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
34	fsShellCommandLibs = $(HOST_NETWORK_LIBS) ;
35}
36
37UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
38
39if ! $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
40	UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
41	UseHeaders [ FDirName $(HAIKU_TOP) headers build os drivers ] : true ;
42	UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;
43	UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
44	UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
45}
46
47UsePrivateHeaders shared storage ;
48UsePrivateHeaders fs_shell ;
49UseHeaders [ FDirName $(HAIKU_TOP) headers private ] : true ;
50UseHeaders [ FDirName $(HAIKU_TOP) src tools fs_shell ] ;
51
52local fatSource =
53	attr.cpp
54	dir.cpp
55	dlist.cpp
56	dosfs.cpp
57	encodings.cpp
58	fat.cpp
59	file.cpp
60	iter.cpp
61	mkdos.cpp
62	util.cpp
63	vcache.cpp
64	version.cpp
65;
66
67BuildPlatformMergeObject <build>fatfs.o : $(fatSource) ;
68
69BuildPlatformMain <build>fat_shell
70	: :
71	<build>fatfs.o
72	<build>fs_shell.a $(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
73	$(HOST_LIBROOT) $(fsShellCommandLibs)
74;
75
76BuildPlatformMain <build>fat_fuse
77	: :
78	<build>fatfs.o
79	<build>fuse_module.a
80	$(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
81	$(HOST_STATIC_LIBROOT) $(fsShellCommandLibs) fuse
82;
83
84SEARCH on [ FGristFiles DeviceOpener.cpp QueryParserUtils.cpp ]
85	+= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems shared ] ;
86