File: Makefile

package info (click to toggle)
z8530-utils 2.4c-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 364 kB
  • ctags: 636
  • sloc: ansic: 6,530; makefile: 83; sh: 3
file content (69 lines) | stat: -rw-r--r-- 2,229 bytes parent folder | download
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
VERSION = 2.4c.dl1bke
KERNEL  = `cat /proc/version | cut -d" " -f3`
CCOPT   = -O2 -Wall -Wstrict-prototypes # -DCONFIG_SCC_STANDALONE
MODOPT  = -c -pipe -D__KERNEL__ -DMODULE -DMODVERSIONS -fomit-frame-pointer\
	  -DCONFIG_SCC_DEV -DCONFIG_SCC_TTY -I/usr/src/linux/include
# MODVER  = -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h
DEVNAME = scc
MAJOR   = 34

all: dep utils

for_kernel: install_source all

module: scc.o all install_module

utils: sccparam sccstat sccinit gencfg

scc.o: scc.c
	gcc ${CCOPT} ${MODOPT} ${MODVER} scc.c -o $@

sccparam: sccparam.c
	gcc ${CCOPT} sccparam.c -o $@

sccstat: sccstat.c
	gcc ${CCOPT} sccstat.c -o $@

sccinit: sccinit.c
	gcc ${CCOPT} sccinit.c -o $@

gencfg: gencfg.c
	gcc ${CCOPT} gencfg.c -o $@

install:
	install -g root -o root -m 0755 -s sccstat $(DESTDIR)/usr/sbin/sccstat
	install -g root -o root -m 0755 -s gencfg $(DESTDIR)/usr/sbin/gencfg
	install -g root -o root -m 0700 -s sccinit $(DESTDIR)/usr/sbin/sccinit
	install -g root -o root -m 0700 -s sccparam $(DESTDIR)/usr/sbin/sccparam
	install -g root -o root -m 0644 z8530drv.conf $(DESTDIR)/etc/z8530drv.conf

install_module:
	install -g root -o root -m 0644 scc.o /lib/modules/${KERNEL}/misc/scc.o

install_source:
	cp -f scc.c /usr/src/linux/drivers/char/
	cp -f scc.h /usr/src/linux/include/linux/

clean:
	rm -f .depend *.o *~ doc/*~ sccstat sccinit sccparam gencfg

distrib:
	( cd .. && tar zcvvf z8530drv-${VERSION}.tar.gz \
	z8530drv-2.4/README z8530drv-2.4/FAQ z8530drv-2.4/Makefile z8530drv-2.4/doc \
	z8530drv-2.4/*.c z8530drv-2.4/scc.h z8530drv-2.4/sccinit z8530drv-2.4/sccparam \
	z8530drv-2.4/sccstat z8530drv-2.4/gencfg z8530drv-2.4/z8530drv.conf \
	z8530drv-2.4/*.lsm z8530drv-2.4/*patch z8530drv-2.4/kernel-2.1.x)

lharc:
	( cd .. && lharc a z8530drv-${VERSION}.lzh \
	z8530drv-2.4/README z8530drv-2.4/FAQ z8530drv-2.4/Makefile z8530drv-2.4/doc \
	z8530drv-2.4/*.c z8530drv-2.4/scc.h z8530drv-2.4/sccinit z8530drv-2.4/sccparam \
	z8530drv-2.4/sccstat z8530drv-2.4/gencfg z8530drv-2.4/z8530drv.conf \
	z8530drv-2.4/*.lsm z8530drv-2.4/*patch z8530drv-2.4/kernel-2.1.x)

dep:
	gcc ${CCOPT} -M sccstat.c sccinit.c sccparam.c >.depend

ifeq (.depend,$(wildcard .depend))
include .depend
endif