version 1.161, 2000/01/17 18:37:23 |
version 1.167, 2000/05/03 15:15:50 |
|
|
# Set PICFLAGS to cc flags for producing position-independent code, |
# Set PICFLAGS to cc flags for producing position-independent code, |
# if not already set. Includes -DPIC, if required. |
# if not already set. Includes -DPIC, if required. |
|
|
# Data-driven table using make variables to control how shared libraries |
# Data-driven table using make variables to control how shared libraries |
# are built for different platforms and object formats. |
# are built for different platforms and object formats. |
# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> |
# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> |
# SHLIB_SOVERSION: version number to be compiled into a shared library |
# SHLIB_SOVERSION: version number to be compiled into a shared library |
# via -soname. Usualy ${SHLIB_MAJOR} on ELF. |
# via -soname. Usualy ${SHLIB_MAJOR} on ELF. |
# NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}. |
# NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}. |
# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library. |
# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library. |
# with ELF, also set shared-lib version for ld.so. |
# with ELF, also set shared-lib version for ld.so. |
# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors |
# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors |
# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors |
# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors |
# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} |
# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} |
# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects. |
# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects. |
# CAPICFLAGS flags for {$CC} to compiling .[Ss] files |
# CAPICFLAGS flags for {$CC} to compiling .[Ss] files |
# (usually just ${CPPPICFLAGS} ${CPICFLAGS}) |
# (usually just ${CPPPICFLAGS} ${CPICFLAGS}) |
# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects. |
# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects. |
|
|
.if ${MACHINE_ARCH} == "alpha" |
.if ${MACHINE_ARCH} == "alpha" |
# Alpha-specific shared library flags |
# Alpha-specific shared library flags |
CPICFLAGS ?= -fpic -DPIC |
CPICFLAGS ?= -fPIC -DPIC |
CPPPICFLAGS?= -DPIC |
CPPPICFLAGS?= -DPIC |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
APICFLAGS ?= |
APICFLAGS ?= |
|
|
|
|
.elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF" |
.elif ${MACHINE_ARCH} == "sparc" && ${OBJECT_FMT} == "ELF" |
|
|
CPICFLAGS ?= -fpic -DPIC |
CPICFLAGS ?= -fPIC -DPIC |
CPPPICFLAGS?= -DPIC |
CPPPICFLAGS?= -DPIC |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
APICFLAGS ?= -KPIC |
APICFLAGS ?= -KPIC |
Line 91 SHLIB_LDSTARTFILE= |
|
Line 91 SHLIB_LDSTARTFILE= |
|
SHLIB_LDENDFILE= |
SHLIB_LDENDFILE= |
SHLIB_SHFLAGS= |
SHLIB_SHFLAGS= |
SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} |
SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} |
CPICFLAGS?= -fpic -DPIC |
CPICFLAGS?= -fPIC -DPIC |
CPPPICFLAGS?= -DPIC |
CPPPICFLAGS?= -DPIC |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS} |
APICFLAGS?= -k |
APICFLAGS?= -k |
Line 253 _LIBS+=llib-l${LIB}.ln |
|
Line 253 _LIBS+=llib-l${LIB}.ln |
|
LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
.endif |
.endif |
|
|
|
.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ |
|
|| ${MKLINKLIB} != "no" |
ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS} |
ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS} |
|
.else |
|
ALLOBJS=${POBJS} ${SOBJS} ${LOBJS} |
|
.endif |
|
.NOPATH: ${ALLOBJS} ${_LIBS} |
|
|
all: ${SRCS} ${ALLOBJS:O} ${_LIBS} |
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS} |
|
|
__archivebuild: .USE |
__archivebuild: .USE |
@rm -f ${.TARGET} |
@rm -f ${.TARGET} |