From e4b0a90e771b94e4b043729a6f0f5564f1d01aca Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 25 Jun 2018 19:55:15 +0000 Subject: Normalize the g(eom,cache,part,...) build. Rather then combining hardlink creation for the geom(8) binary with shared library build, move libraries to src/lib/geom so they are built and installed normally. Create a common Makefile.classes which is included by both lib/geom/Makefile and sbin/geom/Makefile so the symlink and libraries stay in sync. The relocation of libraries allows libraries to be build for 32-bit compat. This also reduces the number of non-standard builds in the system. This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit system out of the box as it will look in the wrong place for libraries unless GEOM_LIBRARY_PATH is set appropriatly in the environment. Reviewed by: bdrewery Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15360 --- sbin/geom/Makefile | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'sbin/geom/Makefile') diff --git a/sbin/geom/Makefile b/sbin/geom/Makefile index 5ef8fb847dd8..9520483815b3 100644 --- a/sbin/geom/Makefile +++ b/sbin/geom/Makefile @@ -1,28 +1,30 @@ # $FreeBSD$ -PACKAGE=runtime -.if defined(RESCUE) || defined(RELEASE_CRUNCH) +.include -.PATH: ${.CURDIR}/class/part \ - ${.CURDIR}/class/label \ - ${.CURDIR}/core \ - ${.CURDIR}/misc +.PATH: ${.CURDIR}/core ${.CURDIR}/misc -PROG= geom -SRCS= geom.c geom_label.c geom_part.c subr.c -MAN= +PACKAGE=runtime +PROG= geom +SRCS= geom.c subr.c +MAN= geom.8 +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/core +CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\" -WARNS?= 2 -CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES +LIBADD= geom util -LIBADD= geom util +.if defined(RESCUE) || defined(RELEASE_CRUNCH) +.PATH: ${SRCTOP}/lib/geom/part \ + ${SRCTOP}/lib/geom/label -.include +SRCS+= geom_label.c geom_part.c +MAN= +WARNS?= 2 +CFLAGS+=-DSTATIC_GEOM_CLASSES .else - -SUBDIR= core class - -.include - +.include "${SRCTOP}/lib/geom/Makefile.classes" +LINKS= ${GEOM_CLASSES:S|^|${BINDIR}/geom ${BINDIR}/g|} .endif + +.include -- cgit v1.2.3