File: Makefile.in

package info (click to toggle)
dtlk 1.12-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 196 kB
  • ctags: 89
  • sloc: ansic: 703; sh: 204; makefile: 98
file content (80 lines) | stat: -rw-r--r-- 2,119 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
70
71
72
73
74
75
76
77
78
79
80

# Makefile for DoubleTalk PC Linux modular device driver

SRC= README COPYRIGHT COPYING dtlk.c dtlk.h dtlk.4 try try.c Makefile.in \
  configure configure.in install-sh dtlk-install dtlk-install.8


VERSIONS        = 2.0.27 2.0.29 2.0.30 2.0.32 2.0.33 2.0.34
MODDIR          = /lib/modules/$$v/misc
INCDIR          = /usr/include/linux
prefix = @prefix@
man1dir=@mandir@/man1
exec_prefix = @exec_prefix@
bindir=$(exec_prefix)/bin
sbindir=@sbindir@
mandir=@mandir@

CC=@CC@
INSTALL=@INSTALL@
CFLAGS=@CFLAGS@
RM=rm

CPU=`uname --machine|sed -e s/^i//`

DEFS= -D__KERNEL__ -DMODVERSIONS -DMODULE -DLINUX -DCPU=$(CPU)

CPPFLAGS        = -I. -DLINUX -I/usr/src/kernel-source-$$v/include \
                              -I/usr/src/kernel-headers-$$v/include 

dtlk.o: dtlk.c dtlk.h
	rm -f linux
	rm -rf $(VERSIONS)
	ln -sf . linux
	for v in $(VERSIONS); do \
		mkdir $$v; \
		$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -Wall -c -m486 -O6 dtlk.c -o $$v/dtlk.o; \
	done

try: try.c
	$(CC) $(CFLAGS) -o try try.c

install:
	for v in $(VERSIONS); do \
		$(INSTALL) -d $(DESTDIR)$(MODDIR); \
		$(INSTALL) $$v/dtlk.o $(DESTDIR)$(MODDIR); \
	done
	install -d $(DESTDIR)$(INCDIR)
	install -m 644 dtlk.h $(DESTDIR)$(INCDIR)

# remove the stuff created by "make"
clean: 
	rm -f core *.o try

# remove the stuff created by "./configure"
distclean: clean
	rm -f Makefile config.cache config.log config.status

# you need autoconf to recover from this
maintainer-clean: distclean
	rm -f configure

uninstall:
	$(RM) -f /lib/modules/`uname --release`/misc/dtlk.o	\
		$(sbindir)/dtlk-install				\
		$(mandir)/man4/dtlk.4 				\
		$(mandir)/man8/dtlk-install.8

dist:$(SRC)
	distname=`sed -e '/^ . .Id. /!d'				      \
		-e 's/[^0-9]*\([0-9.]*\).*/dtlk-\1/'			      \
		-e q dtlk.c`;						      \
	rm -fr $$distname;						      \
	mkdir $$distname;						      \
	for file in $(SRC); do						      \
	  ln $$file $$distname/$$file					      \
	  || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
	done;								      \
	chmod -R a+rX $$distname;					      \
	tar -chz -f $$distname.tar.gz $$distname;			      \
	rm -fr $$distname