File: Makefile

package info (click to toggle)
sl-modem 2.9.11~20110321-11
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 3,448 kB
  • ctags: 2,972
  • sloc: ansic: 11,002; sh: 809; makefile: 232; python: 40; perl: 11
file content (61 lines) | stat: -rw-r--r-- 1,452 bytes parent folder | download | duplicates (6)
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
###########################################################################
#
#
#       Makefile  --  modem Makefile.
#
#       Copyright(c) 2003, Smart Link Ltd. (www.smlink.com)
#	All rights reserved.
#
#       Author: Sasha K (sashak@smlink.com)
#
#
###########################################################################
#
###########################################################################

KERNEL_DIR?=/lib/modules/$(shell uname -r)/build

# tools
INSTALL:=install
# Definitions
MODULES_DIR  = /lib/modules/$(KVERS)/misc
MODEM_DEV   := ttySL0
MODEM_LINK  := modem
MODULES_CONF:= /etc/modules.conf
all: modem

modem:
	$(MAKE) -C $@ all

install: all

ifndef SUPPORT_ALSA
all: drivers
install: install-drivers
uninstall: uninstall-drivers
endif

install:
	$(INSTALL) -D -m 755 modem/slmodemd ${DESTDIR}/usr/sbin/slmodemd
	$(RM) -rf ${DESTDIR}/var/lib/slmodem
	$(INSTALL) -d -D -m 755 ${DESTDIR}/var/lib/slmodem

uninstall:uninstall-drivers
	$(RM) ${DESTDIR}/usr/sbin/slmodemd
	$(RM) -rf ${DESTDIR}/var/lib/slmodem

drivers:
	$(MAKE) -C drivers KERNEL_DIR=$(KERNEL_DIR)

install-drivers: drivers
	$(MAKE) install -C drivers KERNEL_DIR=$(KERNEL_DIR)
uninstall-drivers:
	$(MAKE) uninstall -C drivers KERNEL_DIR=$(KERNEL_DIR)

# misc rules
sub-dirs:= modem drivers
.PHONY: $(sub-dirs) all old clean dep install
clean dep: %: %-sub-dirs
%-sub-dirs:
	$(foreach dir,$(sub-dirs),$(MAKE) -C $(dir) $(patsubst %-sub-dirs,%,$@) && ) echo "done."