xref: /freebsd/usr.sbin/fstyp/Makefile (revision e2df9bb44109577475aeb186e7186ac040f9bde1)
1398e498eSAllan Jude.include <src.opts.mk>
2398e498eSAllan Jude
3be3a49eeSEdward Tomasz NapieralaPROG=	fstyp
40e92585cSPiotr Pawel StefaniakSRCS=	apfs.c befs.c cd9660.c exfat.c ext2fs.c fstyp.c geli.c hammer.c	\
5509798eaSPedro F. Giffuni	hammer2.c hfsplus.c msdosfs.c ntfs.c ufs.c
6398e498eSAllan Jude
769f172f2SAllan Jude.if ${MK_ZFS} != "no"
8398e498eSAllan JudeSRCS +=	zfs.c
9398e498eSAllan Jude.endif
10398e498eSAllan Jude
11be3a49eeSEdward Tomasz NapieralaMAN=	fstyp.8
12be3a49eeSEdward Tomasz Napierala
135ab1cb52SConrad Meyer.if ${MK_ICONV} == "yes"
145ab1cb52SConrad MeyerCFLAGS+=	-DWITH_ICONV
155ab1cb52SConrad Meyer.endif
165ab1cb52SConrad Meyer
17f2567787SRuslan Bukin.include <bsd.endian.mk>
18d60f0f1cSAlan Somers
194b330699SEnji Cooper.if ${TARGET_ENDIANNESS} == 1234
20d511b20aSEnji CooperHAS_TESTS=
214b330699SEnji CooperSUBDIR.${MK_TESTS}+= tests
22d60f0f1cSAlan Somers.endif
23d60f0f1cSAlan Somers
2469f172f2SAllan Jude.if ${MK_ZFS} != "no"
25398e498eSAllan JudeIGNORE_PRAGMA=  YES
26398e498eSAllan Jude
2791f251b2SRobert WingCFLAGS+= -DHAVE_ZFS
289e5787d2SMatt MacyCFLAGS.zfs.c+= -DIN_BASE
299e5787d2SMatt MacyCFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/include
309e5787d2SMatt MacyCFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include
319e5787d2SMatt MacyCFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
32*e2df9bb4SMartin MatuskaCFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include
339e5787d2SMatt MacyCFLAGS.zfs.c+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
349e5787d2SMatt MacyCFLAGS.zfs.c+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
359e5787d2SMatt MacyCFLAGS.zfs.c+= -DHAVE_ISSETUGID
369e5787d2SMatt MacyCFLAGS.zfs.c+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
37e92ffd9bSMartin MatuskaCFLAGS.zfs.c+= -Wno-cast-qual
38398e498eSAllan Jude.endif
39398e498eSAllan Jude
409e5787d2SMatt Macy.for src in ${SRCS}
419e5787d2SMatt Macy.if ${src} != "zfs.c"
429e5787d2SMatt MacyCFLAGS.${src}+=-I${SRCTOP}/sys
439e5787d2SMatt Macy.endif
449e5787d2SMatt Macy.endfor
459e5787d2SMatt Macy
46d6609e6aSAndriy Gapon
47dffce215SKirk McKusickLIBADD=	geom md ufs
48398e498eSAllan Jude
4969f172f2SAllan Jude.if ${MK_ZFS} != "no"
509e5787d2SMatt MacyLIBADD+=nvpair zfs spl
51398e498eSAllan Jude.endif
52398e498eSAllan Jude
53be3a49eeSEdward Tomasz Napierala.include <bsd.prog.mk>
54