1 SubDir HAIKU_TOP src bin debug strace ;
3 UsePrivateHeaders device ;
4 UsePrivateHeaders drivers ;
5 UsePrivateHeaders libroot ;
6 UsePrivateHeaders shared ;
7 UsePrivateHeaders net ;
8 UsePrivateSystemHeaders ;
10 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
12 # find headers generated by gensyscalls
13 SubDirHdrs $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
16 Context.cpp ioctl.cpp MemoryReader.cpp NetworkTypes.cpp
17 strace.cpp TypeHandler.cpp
20 # Our compiler badly chokes when compiling the generated file. So will
21 # split up the job into 20 pieces.
22 local straceSyscallsIndices
23 = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ;
25 local straceSyscallsSource = [ FGristFiles strace_syscalls.cpp ] ;
26 local straceSyscallsObjects ;
28 # Whatever our compiler (gcc 2.95.3) thinks it is doing when compiling the
29 # generated files, it really takes it time when optimization is enabled.
30 # A lot with -O1, even more with -O2. Also the object sizes are amazing.
31 # -O0 fares significantly better; at least speed-wise. I would almost think
32 # about reverting to compiling all in one object file again. Almost...
33 local oldOptim = $(OPTIM) ;
37 for i in $(straceSyscallsIndices) {
38 local object = [ FGristFiles strace_syscalls$(i).o ] ;
39 straceSyscallsObjects += $(object) ;
41 Object $(object) : $(straceSyscallsSource) ;
43 ObjectDefines $(object)
44 : GET_SYSCALLS=get_syscalls$(i) SYSCALLS_CHUNK_$(i) ;
50 BinCommand strace : $(straceSources)
52 $(straceSyscallsObjects)
57 # We need to specify the dependency on the generated syscalls file explicitly.
58 Includes $(straceSyscallsSource)
59 : <syscalls!$(TARGET_PACKAGING_ARCH)>strace_syscalls.h ;