[fb7fe6]: module / Makefile.in  Maximize  Restore  History

Download this file

80 lines (55 with data), 2.3 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
# FIXME FIXME FIXME - sort out for new build scheme
BKCFLAGS=@BKCFLAGS@ @MODVERSIONS@
MODINSTALLDIR=@MODINSTALLDIR@/oprofile
# ugly: in 2.2 only one object file must be compiled with module version,
# NO_MODULE_VERSION expand to __NO_VERSION__ in this case, this work
# because only one module is compiled with BKCFLAGS. If you compile more
# than one module with BKCFLAGS you break 2.2 compatibility. FIXME another way?
BKCFLAGS += -I@topdir@/ -I@topdir@/libutil -I@topdir@/libop -pipe -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -Wunused -O2 -fomit-frame-pointer -fno-strict-aliasing
KCFLAGS := $(BKCFLAGS) -mcpu=i686 @NO_MODULE_VERSION@
ASMFLAGS := -D__ASSEMBLY__ -DMODULE -D__KERNEL__ -traditional -I@KINC@
.PHONY: all install clean uninstall
all: oprofile.o
install: all
-$(MKDIR_P) $(MODINSTALLDIR)
cp oprofile.o $(MODINSTALLDIR)
if test "@KVERS@" = "`uname -r`"; then depmod -a ; fi
uninstall:
-rm -f $(MODINSTALLDIR)/oprofile.o
-rmdir --ignore-fail-on-non-empty $(MODINSTALLDIR)
depmod -a @KVERS@
clean:
rm -rf *.o .deps
oprofile.o: op_init.o op_util.o oprofile_c.o op_nmi.o op_rtc.o oprofile_nmi.o op_syscalls.o op_events_module.o op_apic.o op_fixmap.o compat.o
$(LD) -r -o $@ $^
# we can't use implicit rules for this directory
op_init.o: op_init.c
$(CC) $(BKCFLAGS) -c -o $@ $<
op_util.o: op_util.c
$(CC) $(KCFLAGS) -c -o $@ $<
op_nmi.o: op_nmi.c
$(CC) $(KCFLAGS) -c -o $@ $<
op_rtc.o: op_rtc.c
$(CC) $(KCFLAGS) -c -o $@ $<
# can't use auto deps here
oprofile_c.o: oprofile.c oprofile.h compat.h compat22.h compat24.h
$(CC) $(KCFLAGS) -c -o $@ $<
op_events_module.o: ../libop/op_events.c
$(CC) $(KCFLAGS) -c -o $@ $<
op_apic.o: op_apic.c
$(CC) $(KCFLAGS) -c -o $@ $<
op_fixmap.o: op_fixmap.c
$(CC) $(KCFLAGS) -c -o $@ $<
op_syscalls.o: op_syscalls.c
$(CC) $(KCFLAGS) -c -o $@ $<
compat.o: compat.c
$(CC) $(KCFLAGS) -c -o $@ $<
oprofile.s: oprofile.c
$(CC) $(KCFLAGS) -S $<
oprofile_nmi.o: oprofile_nmi.S
$(CC) $(ASMFLAGS) -c -o $@ $<
# not all object files can use auto deps in this directory
#ALL_SOURCES = compat.c op_nmi.c op_rtc.c op_init.c op_util.c op_x86.c op_syscall.c
#include ../make.deps
# we must overwrite dependencies make flags, the default can't work
#CPPFLAGS_DEPS += $(BKCFLAGS)