-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile.standalone
76 lines (50 loc) · 1.62 KB
/
Makefile.standalone
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
# km_mISDN slave Makefile
# (c) 10/2001 Karsten Keil <[email protected]>
#
KDIR = /usr/src/linux
DESTDIR =
TARGET =
TARGETS := $(TARGET)
default: $(TARGETS)
all: $(TARGETS)
MYDIR := $(PWD)
TOPDIR := $(KDIR)
include $(KDIR)/.config
include $(KDIR)/Makefile
CFLAGS := -I. -I $(KDIR)/drivers/isdn/avmb1 $(CFLAGS) -I $(MYDIR)/newinclude -DLINUX
CC := $(filter-out -I$(HPATH), $(CC)) -I $(MYDIR)/newinclude -I $(HPATH)
ifdef CONFIG_MODVERSIONS
CFLAGS := -DMODULE -DMODVERSIONS -include $(MODVERFILE) $(CFLAGS)
else
CFLAGS := -DMODULE $(CFLAGS)
endif
FINDHPATH += $(MYDIR)/newinclude/linux
MODLIB := $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
mISDN: $(TARGETDIR) depend mISDN_mod
$(MAKE) -C $(TARGETDIR) CFLAGS="$(CFLAGS)" MAKING_MODULES=1 modules
dep-files: scripts/mkdep archdep include/linux/version.h
scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(TARGETDIR)) _FASTDEP_ALL_SUB_DIRS="$(TARGETDIR)"
ifdef CONFIG_MODVERSIONS
$(MAKE) update-modverfile
endif
depend dep: dep-files
ifeq ($(PATCHLEVEL), 2)
TARGETMODDIR = misc
install: install_mod
install_mod: modules_install
mISDN_mod:
echo patchlevel $(PATCHLEVEL)
mkdir -p modules
else
TARGETMODDIR = ../misc
mISDN_mod:
echo patchlevel $(PATCHLEVEL)
install: install_mod
install_mod: $(MODLIB)/$(TARGETMODDIR)
$(MAKE) -C $(TARGETDIR) MOD_DESTDIR=$(TARGETMODDIR) modules_install
$(MODLIB)/$(TARGETMODDIR):
mkdir -p $(MODLIB)/$(TARGETMODDIR)
endif
modlist: $(MODLIB)/$(TARGETMODDIR)
$(MAKE) -C $(TARGETDIR) MOD_DESTDIR=$(TARGETMODDIR) mod_list