Lines Matching +full:ainc +full:-
23 print-shlib-$x:
44 # Originally derrived from NetBSD-1.6
46 # Set PICFLAGS to cc flags for producing position-independent code,
47 # if not already set. Includes -DPIC, if required.
49 # Data-driven table using make variables to control how shared libraries
53 # via -soname. Usually ${SHLIB_MAJOR} on ELF.
57 # with ELF, also set shared-lib version for ld.so.
58 # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
59 # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
73 # Alpha-specific shared library flags
74 FPICFLAGS ?= -fPIC
75 CPICFLAGS ?= -fPIC -DPIC
76 CPPPICFLAGS?= -DPIC
80 # mips-specific shared library flags
86 AINC+=-DABICALLS
87 AFLAGS+= -fPIC
88 AS+= -KPIC
96 # If you use -fPIC you need to define BIGPIC to turn on 32-bit
98 FPICFLAGS ?= -fPIC
99 CPICFLAGS ?= -fPIC -DPIC
100 CPPPICFLAGS?= -DPIC -DBIGPIC
102 APICFLAGS ?= -KPIC
106 # Platform-independent flags for NetBSD a.out shared libraries
109 FPICFLAGS ?= -fPIC
110 CPICFLAGS?= -fPIC -DPIC
111 CPPPICFLAGS?= -DPIC
113 APICFLAGS?= -k
117 # Platform-independent linker flags for ELF shared libraries
120 SHLIB_SHFLAGS= -Wl,-soname,lib${LIB}.so.${SHLIB_SOVERSION}
134 SHLIB_SHFLAGS= -Wl,-soname,lib${LIB}.so.${SHLIB_SOVERSION}
136 SHLIB_SHFLAGS= -assert pure-text
140 CC_PIC?= -fpic
148 LD_X?=-X
149 LD_x?=-x
150 LD_r?=-r
154 LD_shared=-assert pure-text
157 LD_shared=-h lib${LIB}.so.${SHLIB_MAJOR} -G
159 .elif ${TARGET_OSNAME} == "HP-UX"
160 LD_shared=-b
167 LD_shared= -msym -shared -expect_unresolved '*'
168 LD_solib= -all lib${LIB}_pic.a
173 AR_cq= -cqs
178 LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR}
179 LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive
181 # Linux uses GNU ld, which is a multi-pass linker
191 -compatibility_version ${SHLIB_COMPATABILITY_VERSION} \
192 -current_version ${SHLIB_FULLVERSION}
193 LD_shared = -dynamiclib \
194 -flat_namespace -undefined suppress \
195 -install_name ${LIBDIR}/lib${LIB}.${SHLIB_INSTALL_VERSION}.${LD_solink} \
213 PICFLAG ?= -fPIC
215 PICFLAG ?= -fPIC -fno-common
232 LD_shared ?= -Bshareable -Bforcearchive
247 DLLIB ?= -ldl
281 ${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
285 ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET}
288 ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
291 ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
294 ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET}.o
295 @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET}
296 @rm -f ${.TARGET}.o
299 ${COMPILE.cc} ${CXX_PG} ${.IMPSRC} -o ${.TARGET}.o
300 ${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET}
301 @rm -f ${.TARGET}.o
304 ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
305 ${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
306 @rm -f ${.TARGET}.o
311 ${COMPILE.c} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
314 ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
317 ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
321 ${COMPILE.c} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}.o
322 ${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
323 @rm -f ${.TARGET}.o
326 ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}.o
327 ${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
328 @rm -f ${.TARGET}.o
331 ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
332 ${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET}
333 @rm -f ${.TARGET}.o
339 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} -i ${.IMPSRC}
344 PICFLAG=-fpic
371 _LIBS+=llib-l${LIB}.ln
375 .-include <libnames.mk>
389 # avoid -dL errors
409 LT_STATIC=-static
417 ${LIBTOOL} --mode=compile ${CC} ${LT_STATIC} ${CFLAGS} ${CPPFLAGS} ${IMPFLAGS} -c ${.IMPSRC}
419 # can't really do profiled libs with libtool - its too fascist about
422 @rm -f ${.TARGET}
423 ${LIBTOOL} --mode=link ${CC} ${LT_STATIC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${SHLIBDIR}:/usr/lib -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR}:${SHLIB_AGE}
427 @[ -s ${.TARGET}.${SHLIB_AGE} ] || { ln -s .libs/lib${LIB}.${LD_so}* . 2>/dev/null; : }
428 @[ -s ${.TARGET} ] || ln -s ${.TARGET}.${SHLIB_AGE} ${.TARGET}
434 @rm -f ${.TARGET}
442 @rm -f ${.TARGET}
450 @rm -f ${.TARGET}
454 # bound to be non-portable...
458 @rm -f ${.TARGET}
461 ${SHLIB_LD} -shared -Wl,-x ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
462 -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive \
466 -o ${.TARGET} ${SOLIB} ${LDADD} ${SHLIB_LDADD}
469 ${SHLIB_LD} ${LDFLAGS} -o ${.TARGET} \
474 rm -f ${SHLIB_LINKS}; ${SHLIB_LINKS:O:u:@x@ln -s ${.TARGET} $x;@}
479 LLIBS?= -lc
480 llib-l${LIB}.ln: ${LOBJS}
481 @${META_NOECHO} building llib-l${LIB}.ln
482 @rm -f llib-l${LIB}.ln
483 @${LINT} -C${LIB} ${LOBJS} ${LLIBS}
487 rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
488 rm -f lib${LIB}.a ${OBJS}
489 rm -f lib${LIB}_p.a ${POBJS}
490 rm -f lib${LIB}_pic.a lib${LIB}*${LD_solink} lib${LIB}*${LD_solink}.* ${SOBJS}
491 rm -f llib-l${LIB}.ln ${LOBJS}
493 rm -f ${SHLIB_LINKS}
505 sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1${PICO} \1.ln:/' \
516 LIB_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP}
524 [ -d ${DESTDIR}/${LIBDIR} ] || \
525 ${INSTALL} -d ${LIB_INSTALL_OWN} -m 775 ${DESTDIR}${LIBDIR}
527 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 lib${LIB}.a \
533 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \
539 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \
544 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m 644 \
550 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m ${LIBMODE} \
553 (cd ${DESTDIR}${LIBDIR} && { rm -f ${SHLIB_LINKS}; ${SHLIB_LINKS:O:u:@x@ln -s lib${LIB}.${LD_so} $x;@} })
558 ${INSTALL} ${COPY} ${LIB_INSTALL_OWN} -m ${LIBMODE} \
559 llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}
598 test -d ${DESTDIR}${LIBDIR} || ${INSTALL} -d -m775 ${DESTDIR}${LIBDIR}
600 ${INSTALL} ${COPY} -m 644 ${_lib} ${DESTDIR}${LIBDIR}
604 ${INSTALL} ${COPY} -m ${LIBMODE} ${_lib} ${DESTDIR}${LIBDIR}
606 (cd ${DESTDIR}${LIBDIR} && { ${SHLIB_LINKS:O:u:@x@ln -sf ${_lib} $x;@}; })
615 __libtoken ?= __lib${LIB:C,[^a-zA-Z0-9_],_,g}__
617 COPTS += -D${__libtoken}