nwfs/smbfs: Fix and cleanup the Makefiles a bit.
[dragonfly.git] / sys / vfs / smbfs / Makefile
1 # $FreeBSD: src/sys/modules/smbfs/Makefile,v 1.1.2.4 2002/03/26 10:12:29 ume Exp $
2
3 .PATH:  ${.CURDIR}/../../crypto/des \
4         ${.CURDIR}/../../crypto/des/arch/${MACHINE_ARCH} \
5         ${.CURDIR}/../../kern \
6         ${.CURDIR}/../../libkern \
7         ${.CURDIR}/../../netproto/smb
8
9 KMOD=   smbfs
10
11 SRCS=   opt_inet.h opt_ipx.h \
12         opt_netsmb.h \
13         iconv_converter_if.h \
14         md4c.c \
15         smb_conn.c smb_dev.c smb_trantcp.c smb_smb.c smb_subr.c smb_rq.c \
16         smb_usr.c smb_crypt.c smb_iod.c \
17         smbfs_vfsops.c smbfs_node.c smbfs_io.c smbfs_vnops.c \
18         smbfs_subr.c smbfs_smb.c
19
20 .if exists(${.CURDIR}/../../crypto/des/des.h)
21 NETSMBCRYPTO=yes
22 .endif
23
24 .if defined(NETSMBCRYPTO)
25 SRCS+=  des_ecb.c des_setkey.c
26 .if ${MACHINE_ARCH} == "i386"
27 SRCS+=  des_enc.S
28 .else
29 SRCS+=  des_enc.c
30 .endif
31 .endif
32
33 # Build with IPX support (1|0)
34 SMB_IPX?=       0
35
36 # Build with INET support (1|0)
37 SMB_INET?=      1
38
39 .if !defined(BUILDING_WITH_KERNEL)
40 opt_inet.h:
41         touch ${.TARGET}
42 .if ${SMB_INET} > 0
43         echo "#define INET 1" > ${.TARGET}
44 .endif
45
46 opt_ipx.h:
47         touch ${.TARGET}
48 .if ${SMB_IPX} > 0
49         echo "#define IPX 1" > ${.TARGET}
50 .endif
51
52 opt_netsmb.h:
53         echo "#define NETSMB    1"  > ${.TARGET}
54 .if defined(NETSMBCRYPTO)
55         echo "#define NETSMBCRYPTO 1" >> ${.TARGET}
56 .endif
57 .endif
58
59 .include <bsd.kmod.mk>