head	1.12;
access;
symbols
	netbsd-9-5-RELEASE:1.10
	netbsd-11-0-RELEASE:1.12
	netbsd-11-0-RC7:1.12
	netbsd-11-0-RC6:1.12
	netbsd-11-0-RC5:1.12
	netbsd-11-0-RC4:1.12
	netbsd-11-0-RC3:1.12
	netbsd-11-0-RC2:1.12
	netbsd-11-0-RC1:1.12
	perseant-exfatfs-base-20250801:1.12
	netbsd-11:1.12.0.4
	netbsd-11-base:1.12
	netbsd-10-1-RELEASE:1.11
	perseant-exfatfs-base-20240630:1.12
	perseant-exfatfs:1.12.0.2
	perseant-exfatfs-base:1.12
	netbsd-8-3-RELEASE:1.10
	netbsd-9-4-RELEASE:1.10
	netbsd-10-0-RELEASE:1.11
	netbsd-10-0-RC6:1.11
	netbsd-10-0-RC5:1.11
	netbsd-10-0-RC4:1.11
	netbsd-10-0-RC3:1.11
	netbsd-10-0-RC2:1.11
	netbsd-10-0-RC1:1.11
	netbsd-10:1.11.0.6
	netbsd-10-base:1.11
	netbsd-9-3-RELEASE:1.10
	cjep_sun2x-base1:1.11
	cjep_sun2x:1.11.0.4
	cjep_sun2x-base:1.11
	cjep_staticlib_x-base1:1.11
	netbsd-9-2-RELEASE:1.10
	cjep_staticlib_x:1.11.0.2
	cjep_staticlib_x-base:1.11
	netbsd-9-1-RELEASE:1.10
	phil-wifi-20200421:1.10
	phil-wifi-20200411:1.10
	is-mlppp:1.10.0.18
	is-mlppp-base:1.10
	phil-wifi-20200406:1.10
	netbsd-8-2-RELEASE:1.10
	netbsd-9-0-RELEASE:1.10
	netbsd-9-0-RC2:1.10
	netbsd-9-0-RC1:1.10
	phil-wifi-20191119:1.10
	netbsd-9:1.10.0.16
	netbsd-9-base:1.10
	phil-wifi-20190609:1.10
	netbsd-8-1-RELEASE:1.10
	netbsd-8-1-RC1:1.10
	pgoyette-compat-merge-20190127:1.10
	pgoyette-compat-20190127:1.10
	pgoyette-compat-20190118:1.10
	pgoyette-compat-1226:1.10
	pgoyette-compat-1126:1.10
	pgoyette-compat-1020:1.10
	pgoyette-compat-0930:1.10
	pgoyette-compat-0906:1.10
	netbsd-7-2-RELEASE:1.9
	pgoyette-compat-0728:1.10
	netbsd-8-0-RELEASE:1.10
	phil-wifi:1.10.0.14
	phil-wifi-base:1.10
	pgoyette-compat-0625:1.10
	netbsd-8-0-RC2:1.10
	pgoyette-compat-0521:1.10
	pgoyette-compat-0502:1.10
	pgoyette-compat-0422:1.10
	netbsd-8-0-RC1:1.10
	pgoyette-compat-0415:1.10
	pgoyette-compat-0407:1.10
	pgoyette-compat-0330:1.10
	pgoyette-compat-0322:1.10
	pgoyette-compat-0315:1.10
	netbsd-7-1-2-RELEASE:1.9
	pgoyette-compat:1.10.0.12
	pgoyette-compat-base:1.10
	netbsd-7-1-1-RELEASE:1.9
	matt-nb8-mediatek:1.10.0.10
	matt-nb8-mediatek-base:1.10
	perseant-stdc-iso10646:1.10.0.8
	perseant-stdc-iso10646-base:1.10
	netbsd-8:1.10.0.6
	netbsd-8-base:1.10
	prg-localcount2-base3:1.10
	prg-localcount2-base2:1.10
	prg-localcount2-base1:1.10
	prg-localcount2:1.10.0.4
	prg-localcount2-base:1.10
	pgoyette-localcount-20170426:1.10
	bouyer-socketcan-base1:1.10
	pgoyette-localcount-20170320:1.10
	netbsd-7-1:1.9.0.12
	netbsd-7-1-RELEASE:1.9
	netbsd-7-1-RC2:1.9
	netbsd-7-nhusb-base-20170116:1.9
	bouyer-socketcan:1.10.0.2
	bouyer-socketcan-base:1.10
	pgoyette-localcount-20170107:1.10
	netbsd-7-1-RC1:1.9
	pgoyette-localcount-20161104:1.10
	netbsd-7-0-2-RELEASE:1.9
	localcount-20160914:1.9
	netbsd-7-nhusb:1.9.0.10
	netbsd-7-nhusb-base:1.9
	pgoyette-localcount-20160806:1.9
	pgoyette-localcount-20160726:1.9
	pgoyette-localcount:1.9.0.8
	pgoyette-localcount-base:1.9
	netbsd-7-0-1-RELEASE:1.9
	netbsd-7-0:1.9.0.6
	netbsd-7-0-RELEASE:1.9
	netbsd-7-0-RC3:1.9
	netbsd-7-0-RC2:1.9
	netbsd-7-0-RC1:1.9
	netbsd-6-0-6-RELEASE:1.8
	netbsd-6-1-5-RELEASE:1.8
	netbsd-7:1.9.0.4
	netbsd-7-base:1.9
	yamt-pagecache-base9:1.9
	yamt-pagecache-tag8:1.8
	netbsd-6-1-4-RELEASE:1.8
	netbsd-6-0-5-RELEASE:1.8
	tls-earlyentropy:1.9.0.2
	tls-earlyentropy-base:1.9
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.9
	riastradh-drm2-base3:1.9
	netbsd-6-1-3-RELEASE:1.8
	netbsd-6-0-4-RELEASE:1.8
	netbsd-6-1-2-RELEASE:1.8
	netbsd-6-0-3-RELEASE:1.8
	netbsd-6-1-1-RELEASE:1.8
	riastradh-drm2-base2:1.8
	riastradh-drm2-base1:1.8
	riastradh-drm2:1.8.0.14
	riastradh-drm2-base:1.8
	netbsd-6-1:1.8.0.18
	netbsd-6-0-2-RELEASE:1.8
	netbsd-6-1-RELEASE:1.8
	netbsd-6-1-RC4:1.8
	netbsd-6-1-RC3:1.8
	agc-symver:1.8.0.16
	agc-symver-base:1.8
	netbsd-6-1-RC2:1.8
	netbsd-6-1-RC1:1.8
	yamt-pagecache-base8:1.8
	netbsd-6-0-1-RELEASE:1.8
	yamt-pagecache-base7:1.8
	matt-nb6-plus-nbase:1.8
	yamt-pagecache-base6:1.8
	netbsd-6-0:1.8.0.12
	netbsd-6-0-RELEASE:1.8
	netbsd-6-0-RC2:1.8
	tls-maxphys:1.8.0.10
	tls-maxphys-base:1.9
	matt-nb6-plus:1.8.0.8
	matt-nb6-plus-base:1.8
	netbsd-6-0-RC1:1.8
	yamt-pagecache-base5:1.8
	yamt-pagecache-base4:1.8
	netbsd-6:1.8.0.6
	netbsd-6-base:1.8
	yamt-pagecache-base3:1.8
	yamt-pagecache-base2:1.8
	yamt-pagecache:1.8.0.4
	yamt-pagecache-base:1.8
	cherry-xenmp:1.8.0.2
	cherry-xenmp-base:1.8
	bouyer-quota2-nbase:1.7
	bouyer-quota2:1.5.0.2
	bouyer-quota2-base:1.6
	matt-mips64-premerge-20101231:1.5
	matt-premerge-20091211:1.4
	jym-xensuspend-nbase:1.2
	jym-xensuspend:1.2.0.2
	jym-xensuspend-base:1.2;
locks; strict;
comment	@# @;


1.12
date	2023.06.03.09.09.06;	author lukem;	state Exp;
branches;
next	1.11;
commitid	aBaIRnuykonRStrE;

1.11
date	2021.04.12.02.54.08;	author mrg;	state Exp;
branches;
next	1.10;
commitid	BwuEQxep98zmWWOC;

1.10
date	2016.10.04.14.33.16;	author christos;	state Exp;
branches;
next	1.9;
commitid	OnRDPwk7AheOSPoz;

1.9
date	2013.09.11.23.04.10;	author joerg;	state Exp;
branches
	1.9.8.1;
next	1.8;
commitid	LfFxmAH008vTF45x;

1.8
date	2011.05.26.12.56.26;	author joerg;	state Exp;
branches
	1.8.4.1
	1.8.10.1;
next	1.7;

1.7
date	2011.03.04.22.48.29;	author matt;	state Exp;
branches;
next	1.6;

1.6
date	2011.02.11.06.35.26;	author matt;	state Exp;
branches;
next	1.5;

1.5
date	2010.12.23.17.46.55;	author christos;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2009.12.09.00.17.23;	author haad;	state Exp;
branches;
next	1.3;

1.3
date	2009.12.01.23.12.51;	author haad;	state Exp;
branches;
next	1.2;

1.2
date	2008.12.22.01.48.10;	author haad;	state Exp;
branches;
next	1.1;

1.1
date	2008.12.22.00.57.58;	author haad;	state Exp;
branches;
next	;

1.9.8.1
date	2016.11.04.14.42.45;	author pgoyette;	state Exp;
branches;
next	;
commitid	2m1JRwYmpwPkOOsz;

1.8.4.1
date	2014.05.22.14.01.29;	author yamt;	state Exp;
branches;
next	;
commitid	UTzBjHeN8iHMxxBx;

1.8.10.1
date	2014.08.19.23.52.23;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.5.2.1
date	2011.02.17.11.59.17;	author bouyer;	state Exp;
branches;
next	1.5.2.2;

1.5.2.2
date	2011.03.05.15.08.51;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.12
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@#	$NetBSD: Makefile,v 1.11 2021/04/12 02:54:08 mrg Exp $

USE_SHLIBDIR=	yes
USE_FORT?=	no
NOLINT=		#defined

.include "../../lvm2tools.mk"

LIB=		devmapper

CWARNFLAGS.clang+=	-Wno-comment -Wno-parentheses -Wno-switch

CPPFLAGS+=	-I${LIBDEVMAPPER_DISTDIR} \
		-I${LIBDEVMAPPER_DISTDIR}/misc \
		-I${LIBDEVMAPPER_DISTDIR}/mm \
		-I${LIBDEVMAPPER_DISTDIR}/datastruct \
		-I${LIBDEVMAPPER_DISTDIR}/ioctl \
		-I${LVM2_DISTDIR}/include \
		-I${LIBDEVMAPPER_SRCDIR} \
		-D__NetBSD__

CPPFLAGS+=	-D__LIB_DEVMAPPER__ 

LIBDPLIBS+=	dm ${NETBSDSRCDIR}/lib/libdm

SRCS+=		bitset.c hash.c list.c libdm-common.c libdm-file.c \
		libdm-deptree.c	libdm-string.c libdm-report.c \
		dbg_malloc.c pool.c matcher.c parse_rx.c ttree.c \
		libdm-nbsd-iface.c libdm_netbsd.c

.ifdef RUMP_ACTION
CPPFLAGS+=      -DRUMP_ACTION -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE -DRUMP_SYS_OPEN
LDADD+=         -lrumpdev_disk -lrumpdev_dm -lrumpdev
LDADD+=         -lrumpvfs -lrump -lrumpuser -lpthread
DBG=            -g
.endif

# call to `dm_lib_release' lacks nop, can't restore toc; recompile with -fPIC
.if ${MACHINE_ARCH} == "powerpc64"
COPTS.libdm-nbsd-iface.c+= -O0
.endif

.PATH: ${LIBDEVMAPPER_DISTDIR}/
.PATH: ${LIBDEVMAPPER_DISTDIR}/datastruct
.PATH: ${LIBDEVMAPPER_DISTDIR}/mm
.PATH: ${LIBDEVMAPPER_DISTDIR}/regex
.PATH: ${LIBDEVMAPPER_DISTDIR}/ioctl

COPTS.libdm-common.c	+= ${CC_WNO_STRINGOP_OVERFLOW}
COPTS.fs.c		+= ${CC_WNO_STRINGOP_OVERFLOW}

.include <bsd.lib.mk>
@


1.11
log
@add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2016/10/04 14:33:16 christos Exp $
d49 2
a50 2
COPTS.libdm-common.c	+= ${GCC_NO_STRINGOP_OVERFLOW}
COPTS.fs.c		+= ${GCC_NO_STRINGOP_OVERFLOW}
@


1.10
log
@Hack for powerpc64
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2013/09/11 23:04:10 joerg Exp $
d49 3
@


1.9
log
@If a library needs a symbol from another library, pull that library in
explicitly, even if the DT_NEEDED closure would normally already ensure
the presence.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2011/05/26 12:56:26 joerg Exp $
d38 5
@


1.9.8.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2016/10/04 14:33:16 christos Exp $
a37 5
# call to `dm_lib_release' lacks nop, can't restore toc; recompile with -fPIC
.if ${MACHINE_ARCH} == "powerpc64"
COPTS.libdm-nbsd-iface.c+= -O0
.endif

@


1.8
log
@Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2011/03/04 22:48:29 matt Exp $
d24 1
a24 1
LIBDPLIBS+=	prop ${NETBSDSRCDIR}/lib/libprop
@


1.8.10.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d24 1
a24 1
LIBDPLIBS+=	dm ${NETBSDSRCDIR}/lib/libdm
@


1.8.4.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2011/05/26 12:56:26 joerg Exp $
d24 1
a24 1
LIBDPLIBS+=	dm ${NETBSDSRCDIR}/lib/libdm
@


1.7
log
@Use static libdm so dmsetup and lvm can be linked dynamically.
Change LIBDM_* to LIBDEVMAPPER_* so LIBDM can refer to libdm.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/02/11 06:35:26 matt Exp $
d11 2
@


1.6
log
@Use LIBDPLIBS
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2010/12/23 17:46:55 christos Exp $
d11 8
a18 4
CPPFLAGS+=	-I${LIBDM_DISTDIR} -I${LIBDM_DISTDIR}/misc -I${LIBDM_DISTDIR}/mm \
		-I${LIBDM_DISTDIR}/datastruct -I${LIBDM_DISTDIR}/ioctl \
		-I${LVM2_DISTDIR}/include -I${LIBDM_SRCDIR} -D__NetBSD__

d36 5
a40 5
.PATH: ${LIBDM_DISTDIR}/
.PATH: ${LIBDM_DISTDIR}/datastruct
.PATH: ${LIBDM_DISTDIR}/mm
.PATH: ${LIBDM_DISTDIR}/regex
.PATH: ${LIBDM_DISTDIR}/ioctl
@


1.5
log
@PR/44267: Michael van Elst: LVM devices have wrong permissions
- Centralize CPPFLAGS for DM_DEVICE_{UID,GID,MODE}
- Make DM_DEVICE_GID operator DM_DEVICE_MODE 0640 to be more NetBSD like
- make all the code use DM_DEVICE_MODE instead of hard-coding.
- make sure that all mknod calls are followed by a chown call.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2009/12/09 00:17:23 haad Exp $
d18 1
a18 1
LDADD+=		-lprop
@


1.5.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/02/11 06:35:26 matt Exp $
d18 1
a18 1
LIBDPLIBS+=	prop ${NETBSDSRCDIR}/lib/libprop
@


1.5.2.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD$
d11 4
a14 8
CPPFLAGS+=	-I${LIBDEVMAPPER_DISTDIR} \
		-I${LIBDEVMAPPER_DISTDIR}/misc \
		-I${LIBDEVMAPPER_DISTDIR}/mm \
		-I${LIBDEVMAPPER_DISTDIR}/datastruct \
		-I${LIBDEVMAPPER_DISTDIR}/ioctl \
		-I${LVM2_DISTDIR}/include \
		-I${LIBDEVMAPPER_SRCDIR} \
		-D__NetBSD__
d32 5
a36 5
.PATH: ${LIBDEVMAPPER_DISTDIR}/
.PATH: ${LIBDEVMAPPER_DISTDIR}/datastruct
.PATH: ${LIBDEVMAPPER_DISTDIR}/mm
.PATH: ${LIBDEVMAPPER_DISTDIR}/regex
.PATH: ${LIBDEVMAPPER_DISTDIR}/ioctl
@


1.4
log
@Add support for building libdevmapper against RUMP.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2009/12/01 23:12:51 haad Exp $
d16 1
a16 2
CPPFLAGS+=	-D__LIB_DEVMAPPER__ -DDM_DEVICE_UID=0 \
		-DDM_DEVICE_GID=0 -DDM_DEVICE_MODE=0600
@


1.3
log
@Remove not needed debugging CFLAGS.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2008/12/22 01:48:10 haad Exp $
d26 7
@


1.2
log
@Add NetBSD protocol description header file. Libdevmapper is now buildable
without kernel sources.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2008/12/22 00:57:58 haad Exp $
a10 2
CFLAGS+= -fno-inline

@


1.1
log
@Add reachover Makefiles to build LVM2 tools on NetBSD.
@
text
@d1 1
a1 1
#	$NetBSD$
a10 2
NETBSD_DM_PATH= ${NETBSDSRCDIR}/sys/dev/dm

d15 1
a15 1
		-I${LVM2TOOLS_DISTDIR}/include -I${NETBSD_DM_PATH} -D__NetBSD__
@

