forked from dtrace4linux/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
113 lines (105 loc) · 3.26 KB
/
Makefile
File metadata and controls
113 lines (105 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dtracedrv-objs := \
ctf_hash.o \
ctf_lookup.o \
ctf_mod.o \
ctf_open.o \
ctf_struct.o \
ctf_subr.o \
ctf_types.o \
ctf_util.o \
ctl.o \
cpu_arm.o \
cpu_x86.o \
cyclic_linux.o \
dcpc.o \
dis_tables.o \
dtrace.o \
dtrace_asm.o \
dtrace_isa.o \
dtrace_linux.o \
dtrace_subr.o \
dwarf.o \
fasttrap.o \
fasttrap_isa.o \
fasttrap_linux.o \
fbt_linux.o \
instr_linux.o \
instr_size.o \
intr.o \
intr_x86-32.o \
intr_x86-64.o \
libc.o \
missing.o \
mutex.o \
printf.o \
profile.o \
prov_common.o \
prov_proc.o \
sdt_linux.o \
sdt_subr.o \
signal.o \
systrace.o \
systrace_asm.o \
taskq.o \
tcp.o \
toxic.o \
uncompress.o \
vminfo.o \
x_call.o \
xen.o
ifdef BUILD_i386
###############################################
# Kernel may be using -regparm, and we #
# cannot call the funcs in libgcc.a since #
# they are the wrong calling convention. #
# Use divmod64.c to trampoline into the #
# real functions. #
###############################################
dtracedrv-objs += divmod64.o
LDFLAGS += --wrap __moddi3
LDFLAGS += --wrap __udivdi3
LDFLAGS += --wrap __umoddi3
LDFLAGS += --wrap __divdi3
dtracedrv-objs += ../libgcc.a
endif
ifdef BUILD_ARM
dtracedrv-objs += intr_arm.o
dtracedrv-objs += arm_divmod64.o
endif
obj-m := dtracedrv.o
H = dtrace_linux.h dtrace_proto.h
EXTRA_AFLAGS += \
-I$(M)/../../linux
# Add -gdwarf-2 because gcc-4.8 will cause mkctf.sh to fail due to
# something libdwarf doesnt like.
EXTRA_CFLAGS += -g -gdwarf-2 \
-I$(M) \
-I$(M)/../.. \
-I$(M)/../../include \
-I$(M)/../../linux \
-I$(M)/../../common/ctf \
-I$(M)/../../uts/common \
-D_KERNEL -DCTF_OLD_VERSIONS $(PTR32)
######################################################################
# Handle include files which exist or moved around amongst #
# different kernel releases. #
# 20110415 We are moving this to tools/mkport.pl and build/port.h #
# since OpenSuse is proving challenging to keep nice and simple. #
######################################################################
#EXTRA_CFLAGS += $(shell test -f include/asm/kdebug.h && echo -DHAVE_INCLUDE_ASM_KDEBUG_H)
#EXTRA_CFLAGS += $(shell test -f include/linux/kdebug.h && echo -DHAVE_INCLUDE_LINUX_KDEBUG_H)
#EXTRA_CFLAGS += $(shell test -f include/linux/hrtimer.h && echo -DHAVE_INCLUDE_LINUX_HRTIMER_H)
#EXTRA_CFLAGS += $(shell test -f include/linux/mutex.h && echo -DHAVE_INCLUDE_LINUX_MUTEX_H)
#EXTRA_CFLAGS += $(shell test -f include/asm/mutex.h && echo -DHAVE_INCLUDE_ASM_MUTEX_H)
#EXTRA_CFLAGS += $(shell test -f include/linux/stacktrace.h && echo -DHAVE_INCLUDE_LINUX_STACKTRACE_H)
#EXTRA_CFLAGS += $(shell test -f include/asm/stacktrace.h && echo -DHAVE_INCLUDE_ASM_STACKTRACE_H)
#EXTRA_CFLAGS += $(shell test -f include/linux/semaphore.h && echo -DHAVE_INCLUDE_LINUX_SEMAPHORE_H)
#EXTRA_CFLAGS += $(shell test -f include/asm/semaphore.h && echo -DHAVE_INCLUDE_ASM_SEMAPHORE_H)
#EXTRA_CFLAGS += $(shell test -f include/asm/msr-index.h && echo -DHAVE_INCLUDE_ASM_MSR_INDEX_H)
#EXTRA_CFLAGS += $(shell grep -s atomic.*count include/*/semaphore*.h >/dev/null && echo -DHAVE_SEMAPHORE_ATOMIC_COUNT)
clean:
rm -rf .tmp_versions *.a *.o *.ko *.bak .*.d .*.cmd *.mod.c Module.* modules.order
unl:
setuid root rmmod dtracedrv
echo:
echo $(EXTRA_CFLAGS)