1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5PROG= fstyp 6SRCS= apfs.c befs.c cd9660.c exfat.c ext2fs.c fstyp.c geli.c hammer.c \ 7 hammer2.c hfsplus.c msdosfs.c ntfs.c ufs.c 8 9.if ${MK_ZFS} != "no" 10SRCS += zfs.c 11.endif 12 13MAN= fstyp.8 14 15.if ${MK_ICONV} == "yes" 16CFLAGS+= -DWITH_ICONV 17.endif 18 19.include <bsd.endian.mk> 20 21.if ${TARGET_ENDIANNESS} == 1234 22HAS_TESTS= 23SUBDIR.${MK_TESTS}+= tests 24.endif 25 26.if ${MK_ZFS} != "no" 27IGNORE_PRAGMA= YES 28 29CFLAGS+= -DHAVE_ZFS 30CFLAGS.zfs.c+= -DIN_BASE 31CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/include 32CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include 33CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd 34CFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include 35CFLAGS.zfs.c+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h 36CFLAGS.zfs.c+= -DHAVE_ISSETUGID 37CFLAGS.zfs.c+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h 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