xref: /freebsd/usr.sbin/fstyp/Makefile (revision e2df9bb44109577475aeb186e7186ac040f9bde1)
1.include <src.opts.mk>
2
3PROG=	fstyp
4SRCS=	apfs.c befs.c cd9660.c exfat.c ext2fs.c fstyp.c geli.c hammer.c	\
5	hammer2.c hfsplus.c msdosfs.c ntfs.c ufs.c
6
7.if ${MK_ZFS} != "no"
8SRCS +=	zfs.c
9.endif
10
11MAN=	fstyp.8
12
13.if ${MK_ICONV} == "yes"
14CFLAGS+=	-DWITH_ICONV
15.endif
16
17.include <bsd.endian.mk>
18
19.if ${TARGET_ENDIANNESS} == 1234
20HAS_TESTS=
21SUBDIR.${MK_TESTS}+= tests
22.endif
23
24.if ${MK_ZFS} != "no"
25IGNORE_PRAGMA=  YES
26
27CFLAGS+= -DHAVE_ZFS
28CFLAGS.zfs.c+= -DIN_BASE
29CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/include
30CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include
31CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
32CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include
33CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
34CFLAGS.zfs.c+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
35CFLAGS.zfs.c+= -DHAVE_ISSETUGID
36CFLAGS.zfs.c+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
37CFLAGS.zfs.c+= -Wno-cast-qual
38.endif
39
40.for src in ${SRCS}
41.if ${src} != "zfs.c"
42CFLAGS.${src}+=-I${SRCTOP}/sys
43.endif
44.endfor
45
46
47LIBADD=	geom md ufs
48
49.if ${MK_ZFS} != "no"
50LIBADD+=nvpair zfs spl
51.endif
52
53.include <bsd.prog.mk>
54