1SubDir HAIKU_TOP src add-ons kernel file_systems udf drive_setup_addon ;
2
3# save original optimization level
4oldOPTIM = $(OPTIM) ;
5
6# set some additional defines
7{
8	local defines =
9		DRIVE_SETUP_ADDON
10		;
11
12	if $(COMPILE_FOR_R5) {
13		defines += COMPILE_FOR_R5 ;
14	}
15
16	if $(TARGET_KERNEL_ARCH) = x86_gcc2 {
17		# the gcc on BeOS doesn't compile BFS correctly with -O2 or more
18		OPTIM = -O1 ;
19	}
20
21	defines = [ FDefines $(defines) ] ;
22	SubDirCcFlags $(defines) -Wno-multichar ;
23	SubDirC++Flags $(defines) -Wno-multichar ;
24}
25
26UsePrivateHeaders [ FDirName kernel util ] ;
27SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems udf ] ;
28
29# Note that the add-on is named "i-udf-ds" to put it alphabetically
30# before the standard iso9660 add-on, thus giving it first dibs at
31# iso9660/UDF hybrid discs.
32Addon i-udf-ds :
33	udf-ds.cpp
34	Recognition.cpp
35	UdfDebug.cpp
36	UdfString.cpp
37	UdfStructures.cpp
38	Utils.cpp
39;
40
41SEARCH on [ FGristFiles
42		Recognition.cpp UdfDebug.cpp UdfString.cpp UdfStructures.cpp Utils.cpp
43	] = [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems udf ] ;
44
45rule InstallUDFDS
46{
47	Depends $(<) : $(>) ;
48}
49
50actions ignore InstallUDFDS
51{
52	cp $(>) /boot/system/add-ons/drive_setup/fs/
53}
54
55InstallUDFDS install : i-udf-ds ;
56
57# restore original optimization level
58OPTIM = $(oldOPTIM) ;
59
60