summaryrefslogtreecommitdiffstats
path: root/contrib/smbfs/Makefile
blob: 6729780dda531ed0bf783fb3001c4e3650c451db (plain)
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
#	$Id: Makefile,v 1.12 2001/04/16 04:34:26 bp Exp $
#
#	Valid targets:
#	install		installs binaries and man pages
#	deinstall	undo install (except man pages)
#	install-src	copy .h files in /usr/local/include
#	install-lib	copy lib files in /usr/lib
#	deinstall-lib,
#	deinstall-src	undo corresponding install-* target
#	clean		cleanup source tree

.if ${MACHINE_ARCH} != "i386"
.	error "only IA32 machines supported"
.endif

CONFIG_INT?=	config.int
CONFIG_MK?=	config.mk

CFGDEPEND=

.ifmake !configure && !clean
.  if !exists(${CONFIG_INT})
.	error "Run 'make configure' before build"
.  else
.	include "${CONFIG_INT}"
.  endif
.else
.  if exists(${CONFIG_MK})
CFGDEPEND=	${CONFIG_MK}

${CONFIG_MK}:	config.mk.in
	@echo Your ${CONFIG_MK} file is older than the config.mk.in file
	@echo Please check for possible changes
	@false

.	include "${CONFIG_MK}"
.  endif
.endif

BUILDKLD?=yes
PREFIX?=/usr/local
SYSDIR?=/usr/src/sys

configure::
.if ${CFGDEPEND} == ${CONFIG_MK}
	@echo Using ${CFGDEPEND} file...
.endif
	echo PREFIX= ${PREFIX} > ${CONFIG_INT}
	echo SYSDIR=${SYSDIR} >> ${CONFIG_INT}
	echo KMODDIR=${KMODDIR} >> ${CONFIG_INT}
	echo SINGLEKLD=yes >> ${CONFIG_INT}
.if !defined(WITHOUT_CRYPT)
	echo ENCRYPTED_PASSWD=yes >> ${CONFIG_INT}
.endif
.if defined(SMP_SUPPORT) || defined(SMP)
	echo SMP=yes >> ${CONFIG_INT}
.endif

SUBDIR=

.if defined(COMPLETEBUILD) || (${BUILDKLD} == yes && !exists(${SYSDIR}/netsmb/smb.h))
SUBDIR+= kernel/modules
.endif

SUBDIR+= lib

SUBDIR+= mount_smbfs smbutil

install-src install-lib deinstall-lib deinstall-src:
	cd kernel && make ${.TARGET}
	cd lib && make ${.TARGET}


makedev:
	@-( if [ `mount -t devfs | wc -l` = 0 ]; then \
		cd /dev && && rm -f nsmb* && mknod nsmb0 c 144 0; \
	    else \
		echo This operation is not required with devfs; \
	    fi; \
	)

cleandepend deinstall: _SUBDIRUSE

clean: _SUBDIRUSE
	rm -f ${CONFIG_INT}

.include <bsd.subdir.mk>
OpenPOWER on IntegriCloud