File: Makefile

package info (click to toggle)
netatalk 1.4b2%2Basun2.1.3-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,288 kB
  • ctags: 2,976
  • sloc: ansic: 35,145; makefile: 1,968; sh: 346
file content (123 lines) | stat: -rw-r--r-- 3,679 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Ultrix specific defines, passed to subdirectories.
#DEFS=
DEFS=-I../../sys/ultrix -DUSE_OLD_RQUOTA
OPTOPTS=
#CC=	cc 
CC = gcc 
INSTALL=	install
AFPLIBS= 
ADDLIBS=

INCPATH = -I../../include -I../netatalk
CFLAGS=	${DEFS} ${OPTOPTS} ${INCPATH}

ALL=	../../libatalk ../../include ../../bin ../../etc ../../man

oops:
	@echo "Read README again.  Don't type 'make' here."
	@exit 1

all:	 ${ALL}

../../bin ../../etc:	../../libatalk

${ALL}:	FRC
	cd $@; ${MAKE} ${MFLAGS} CC="${CC}" \
	    ADDLIBS="${ADDLIBS}" DEFS="${DEFS}" OPTOPTS="${OPTOPTS}" \
	    SBINDIR="${SBINDIR}" BINDIR="${BINDIR}" RESDIR="${RESDIR}" \
	    ETCDIR="${ETCDIR}" LIBDIR="${LIBDIR}" INCDIR="${INCDIR}" \
	    AFPLIBS="${AFPLIBS}" \
	    DESTDIR="${DESTDIR}" AFSDIR="${AFSDIR}" KRBDIR="${KRBDIR}" all

FRC: 

install :
	-mkdir ${DESTDIR}
	for i in ${ALL}; \
	    do (cd $$i; ${MAKE} ${MFLAGS} CC="${CC}" \
		ADDLIBS="${ADDLIBS}" DEFS="${DEFS}" OPTOPTS="${OPTOPTS}" \
	        SBINDIR="${SBINDIR}" BINDIR="${BINDIR}" RESDIR="${RESDIR}" \
	        ETCDIR="${ETCDIR}" LIBDIR="${LIBDIR}" INCDIR="${INCDIR}" \
		DESTDIR="${DESTDIR}" MANDIR="${MANDIR}" \
		AFSDIR="${AFSDIR}" KRBDIR="${KRBDIR}" AFPLIBS="${AFPLIBS}" \
		INSTALL="${INSTALL}" $@); \
	done
	rm -f ${ETCDIR}/rc.atalk
	sed -e s@:DESTDIR:@${DESTDIR}@ -e s@:SBINDIR:@${SBINDIR}@ \
		-e s@:BINDIR:@${BINDIR}@ -e s@:RESDIR:@${RESDIR}@ \
		-e s@:ETCDIR:@${ETCDIR}@ -e s@:LIBDIR:@${LIBDIR}@ \
		-e s@:INCDIR:@${INCDIR}@ \
	    < ../../rc.atalk.bsd > ${ETCDIR}/rc.atalk
	@echo
	@echo "Install is done.  Don't forget to add lines from"
	@echo "services.atalk to /etc/services and to call rc.atalk
	@echo "in /etc/rc.  Next, install the kernel patches."
	@echo "See README.ULTRIX for more information."

kpatch :
	@echo "WARNING!!!  This patches your kernel!!!"
	@echo -n "(hit control-c with in 10 seconds, to stop)"
	@sleep 10
	@echo
	@echo
	@if grep -s -w atalk /sys/conf/files; then \
	    echo "You already have a version of netatalk installed."; \
	    echo "You will have to remove this old version.  See"; \
	    echo "README.ULTRIX for specific instructions."; \
	    exit 1; \
	else \
	    case `/bin/uname -r` in \
		4.1) echo -n "Applying 4.1 patches..."; \
		    patch -s -d /sys -p0 < kpatch-4.1;  \
		    echo " done."; \
		    ;; \
		4.2|4.3|4.4) echo -n "Applying 4.2/4.3/4.4 patches..."; \
		    patch -s -d /sys -p0 < kpatch-4.2;  \
		    echo " done."; \
		    ;; \
		*) echo "Unknown release of Ultrix"; exit 1; \
		    ;; \
	    esac; \
	fi
	@echo
	@echo "Next, install the netatalk kernel files.  See README.ULTRIX"
	@echo "for specific instructions."

kinstall :
	@echo "Copying netatalk to kernel building area..."
	-mkdir /sys/net/netatalk
	cp ../netatalk/*.[ch] *.[ch] /sys/net/netatalk
	@echo "Done."
	@echo
	@echo "Next, make a new kernel.  See README.ULTRIX"
	@echo "for specific instructions."

clean :
	for i in ${ALL}; \
	    do (cd $$i; ${MAKE} ${MFLAGS} clean); \
	done

sysclean :

depend :
	for i in ${ALL}; \
	    do (cd $$i; ${MAKE} ${MFLAGS} DEFS=${DEFS} depend); \
	done
	for i in ${SRC} ; do \
	    ${CC} -M ${DEFS} ${INCPATH} $$i | \
	    awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
		else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
		else rec = rec " " $$2 } } \
		END { print rec } ' >> makedep; done
	sed -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile > Makefile.tmp
	cat makedep >> Makefile.tmp
	rm makedep
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile.tmp
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile.tmp
	echo '# see make depend above' >> Makefile.tmp
	rm -f Makefile.bak
	cp Makefile Makefile.bak
	mv Makefile.tmp Makefile

# DO NOT DELETE THIS LINE