[BACK]Return to bsd.prog.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.prog.mk between version 1.247 and 1.266

version 1.247, 2010/03/02 20:49:18 version 1.266, 2011/08/27 18:35:20
Line 52  AFLAGS+= ${PIE_AFLAGS}
Line 52  AFLAGS+= ${PIE_AFLAGS}
 LDFLAGS+=       ${PIE_LDFLAGS}  LDFLAGS+=       ${PIE_LDFLAGS}
 .endif  .endif
   
 ##### Default values  
 .if empty(CPPFLAGS:M-nostdinc)  
 CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}  
 .endif  
 .if empty(CXXFLAGS:M-nostdinc++)  
 CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}  
 .endif  
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
 OBJCFLAGS+=     ${OBJCOPTS}  OBJCFLAGS+=     ${OBJCOPTS}
 MKDEP_SUFFIXES?=        .o .ln  MKDEP_SUFFIXES?=        .o .ln
Line 70  CTFMFLAGS+= -g
Line 63  CTFMFLAGS+= -g
 .endif  .endif
   
 # ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o  # ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o
 .if ${OBJECT_FMT} == "ELF"  
 .ifndef LIBCRTBEGIN  .ifndef LIBCRTBEGIN
 LIBCRTBEGIN=    ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN}  LIBCRTBEGIN=    ${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGIN}
 .MADE: ${LIBCRTBEGIN}  .MADE: ${LIBCRTBEGIN}
Line 80  LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr
Line 72  LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr
 .MADE: ${LIBCRTEND}  .MADE: ${LIBCRTEND}
 .endif  .endif
 _SHLINKER=      ${SHLINKDIR}/ld.elf_so  _SHLINKER=      ${SHLINKDIR}/ld.elf_so
 .else  
 LIBCRTBEGIN?=  
 LIBCRTEND?=  
 _SHLINKER=      ${SHLINKDIR}/ld.so  
 .endif  
   
 .ifndef LIBCRT0  .ifndef LIBCRT0
 LIBCRT0=        ${DESTDIR}/usr/lib/crt0.o  LIBCRT0=        ${DESTDIR}/usr/lib/crt0.o
Line 102  LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
Line 89  LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
         archive asn1 bluetooth bsdmalloc bz2 c c_pic cdk com_err compat \          archive asn1 bluetooth bsdmalloc bz2 c c_pic cdk com_err compat \
         crypt crypto crypto_idea crypto_mdc2 crypto_rc5 \          crypt crypto crypto_idea crypto_mdc2 crypto_rc5 \
         curses dbm des edit event \          curses dbm des edit event \
         fetch form fl g2c gcc gnumalloc gssapi hdb heimntlm hx509 intl ipsec \          fetch form fl g2c gcc gnumalloc gssapi hdb heimbase heimntlm hx509 \
         kadm5clnt kadm5srv kafs krb5 kvm l lber ldap ldap_r \          intl ipsec \
           kadm5clnt kadm5srv kafs krb5 kvm l lber ldap ldap_r lua \
         m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \          m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \
         puffs radius resolv rmt roken rpcsvc rt rump rumpuser skey sl ss \          puffs radius resolv rmt roken rpcsvc rt rump rumpuser saslc skey sl ss \
         ssh ssl termcap usbhid util wrap y z bind9 dns lwres isccfg isccc isc \          ssh ssl termcap usbhid util wrap y z bind9 dns lwres isccfg isccc isc \
         \          \
         rumpfs_cd9660fs rumpfs_efs rumpfs_ext2fs rumpfs_ffs rumpfs_hfs \          rumpfs_cd9660fs rumpfs_efs rumpfs_ext2fs rumpfs_ffs rumpfs_hfs \
         rumpfs_lfs rumpfs_msdosfs rumpfs_nfs rumpfs_ntfs rumpfs_syspuffs \          rumpfs_lfs rumpfs_msdosfs rumpfs_nfs rumpfs_ntfs rumpfs_syspuffs \
         rumpfs_tmpfs rumpfs_udf rumpfs_ufs          rumpfs_tmpfs rumpfs_udf rumpfs_ufs \
           wind
 .ifndef LIB${_lib:tu}  .ifndef LIB${_lib:tu}
 LIB${_lib:tu}=  ${DESTDIR}/usr/lib/lib${_lib}.a  LIB${_lib:tu}=  ${DESTDIR}/usr/lib/lib${_lib}.a
 .MADE:          ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded  .MADE:          ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
 .endif  .endif
 .endfor  .endfor
   # atf-c and atf-c++ are special cases because we cannot use [-+] as part of
   # make(1) variable names.  Just define them here.
   LIBATF_C=       ${DESTDIR}/usr/lib/libatf-c.a
   LIBATF_CXX=     ${DESTDIR}/usr/lib/libatf-c++.a
   .MADE:          ${LIBATF_C} ${LIBATF_CXX}
   
 # PAM applications, if linked statically, need more libraries  # PAM applications, if linked statically, need more libraries
 .if (${MKPIC} == "no")  .if (${MKPIC} == "no")
Line 124  PAM_STATIC_LDADD+= -lssh
Line 118  PAM_STATIC_LDADD+= -lssh
 PAM_STATIC_DPADD+= ${LIBSSH}  PAM_STATIC_DPADD+= ${LIBSSH}
 .endif  .endif
 .if (${MKKERBEROS} != "no")  .if (${MKKERBEROS} != "no")
 PAM_STATIC_LDADD+= -lkafs -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypto  PAM_STATIC_LDADD+= -lkafs -lkrb5 -lhx509 -lwind -lasn1 \
 PAM_STATIC_DPADD+= ${LIBKAFS} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} \          -lroken -lcom_err -lheimbase -lcrypto
         ${LIBCOM_ERR} ${LIBCRYPTO}  PAM_STATIC_DPADD+= ${LIBKAFS} ${LIBKRB5} ${LIBHX509} ${LIBWIND} ${LIBASN1} \
           ${LIBROKEN} ${LIBCOM_ERR} ${LIBHEIMBASE} ${LIBCRYPTO}
 .endif  .endif
 .if (${MKSKEY} != "no")  .if (${MKSKEY} != "no")
 PAM_STATIC_LDADD+= -lskey  PAM_STATIC_LDADD+= -lskey
Line 167  CPPFLAGS+= -DRESCUEDIR=\"${RESCUEDIR}\"
Line 162  CPPFLAGS+= -DRESCUEDIR=\"${RESCUEDIR}\"
   
 _PROGLDOPTS=  _PROGLDOPTS=
 .if ${SHLINKDIR} != "/usr/libexec"      # XXX: change or remove if ld.so moves  .if ${SHLINKDIR} != "/usr/libexec"      # XXX: change or remove if ld.so moves
 .if ${OBJECT_FMT} == "ELF"  
 _PROGLDOPTS+=   -Wl,-dynamic-linker=${_SHLINKER}  _PROGLDOPTS+=   -Wl,-dynamic-linker=${_SHLINKER}
 .endif  .endif
 .endif  
 .if ${SHLIBDIR} != "/usr/lib"  .if ${SHLIBDIR} != "/usr/lib"
 _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBDIR} \  _PROGLDOPTS+=   -Wl,-rpath,${SHLIBDIR} \
                 -R${SHLIBDIR} \                  -L=${SHLIBDIR}
                 -L${DESTDIR}${SHLIBDIR}  
 .elif ${SHLIBINSTALLDIR} != "/usr/lib"  .elif ${SHLIBINSTALLDIR} != "/usr/lib"
 _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \  _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
                 -L${DESTDIR}${SHLIBINSTALLDIR}                  -L=${SHLIBINSTALLDIR}
 .endif  .endif
 _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}/usr/lib \  
                 -L${DESTDIR}/usr/lib  
   
 __proginstall: .USE  __proginstall: .USE
         ${_MKTARGET_INSTALL}          ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \          ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
                 ${STRIPFLAG} ${.ALLSRC} ${.TARGET}                  ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
   
   __progrumpinstall: .USE
           ${_MKTARGET_INSTALL}
           ${INSTALL_FILE} -o ${RUMPBINOWN} -g ${RUMPBINGRP} -m ${RUMPBINMODE} \
                   ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
   
 __progdebuginstall: .USE  __progdebuginstall: .USE
         ${_MKTARGET_INSTALL}          ${_MKTARGET_INSTALL}
         ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \          ${INSTALL_FILE} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
Line 203  _APPEND_MANS=yes
Line 198  _APPEND_MANS=yes
 _APPEND_SRCS=yes  _APPEND_SRCS=yes
   
 _CCLINKFLAGS=  _CCLINKFLAGS=
 .if defined(DESTDIR)  
 _CCLINKFLAGS+=  -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/  
 .endif  
   
 .if defined(PROG_CXX)  .if defined(PROG_CXX)
 PROG=           ${PROG_CXX}  PROG=           ${PROG_CXX}
 _CCLINK=        ${CXX} ${_CCLINKFLAGS}  _CCLINK=        ${CXX} ${_CCLINKFLAGS}
 .endif  .endif
   
   .if defined(RUMPPRG)
   PROG=                   ${RUMPPRG}
   .ifndef CRUNCHEDPROG
   PROGS=                  ${RUMPPRG} rump.${RUMPPRG}
   . if defined(SRCS)
   SRCS.rump.${PROG}:=     ${SRCS} ${PROG}_rumpops.c ${RUMPSRCS}
   SRCS+=                  ${PROG}_hostops.c
   . else
   SRCS=                   ${PROG}.c ${PROG}_hostops.c
   SRCS.rump.${PROG}=      ${PROG}.c ${PROG}_rumpops.c ${RUMPSRCS}
   . endif
   DPSRCS+=                ${PROG}_rumpops.c ${RUMPSRCS}
   LDADD.rump.${PROG}+=    -lrumpclient
   DPADD.rump.${PROG}+=    ${LIBRUMPCLIENT}
   MAN.rump.${PROG}=       # defined but feeling empty
   _RUMPINSTALL.rump.${PROG}=# defined
   .else # CRUNCHEDPROG
   PROGS=                  ${PROG}
   CPPFLAGS+=              -DCRUNCHOPS
   .endif
   .endif
   
 .if defined(PROG)  .if defined(PROG)
 _CCLINK?=       ${CC} ${_CCLINKFLAGS}  _CCLINK?=       ${CC} ${_CCLINKFLAGS}
 .  if defined(MAN)  .  if defined(MAN)
Line 232  _APPEND_SRCS= no
Line 246  _APPEND_SRCS= no
   
 # Turn the single-program PROG and PROG_CXX variables into their multi-word  # Turn the single-program PROG and PROG_CXX variables into their multi-word
 # counterparts, PROGS and PROGS_CXX.  # counterparts, PROGS and PROGS_CXX.
 .if defined(PROG_CXX) && !defined(PROGS_CXX)  .if !defined(RUMPPRG)
   .  if defined(PROG_CXX) && !defined(PROGS_CXX)
 PROGS_CXX=      ${PROG_CXX}  PROGS_CXX=      ${PROG_CXX}
 .elif defined(PROG) && !defined(PROGS)  .  elif defined(PROG) && !defined(PROGS)
 PROGS=          ${PROG}  PROGS=          ${PROG}
   .  endif
 .endif  .endif
   
   
   
 #  #
 # Per-program definitions and targets.  # Per-program definitions and targets.
 #  #
Line 262  _CCLINK.${_P}= ${CXX} ${_CCLINKFLAGS}
Line 276  _CCLINK.${_P}= ${CXX} ${_CCLINKFLAGS}
 BINDIR.${_P}?=          ${BINDIR}  BINDIR.${_P}?=          ${BINDIR}
 PROGNAME.${_P}?=        ${_P}  PROGNAME.${_P}?=        ${_P}
   
 .if ${MKDEBUG} != "no" && ${OBJECT_FMT} == "ELF" && !commands(${_P})  .if ${MKDEBUG} != "no" && !commands(${_P})
 _PROGDEBUG.${_P}:=      ${PROGNAME.${_P}}.debug  _PROGDEBUG.${_P}:=      ${PROGNAME.${_P}}.debug
 .endif  .endif
   
Line 300  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
Line 314  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
 .if !commands(${_P})  .if !commands(${_P})
         ${_MKTARGET_LINK}          ${_MKTARGET_LINK}
         ${_CCLINK.${_P}} \          ${_CCLINK.${_P}} \
             ${DESTDIR:D-Wl,-nostdlib} \  
             ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} \              ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} \
             ${OBJS.${_P}} ${_LDADD.${_P}} \              ${OBJS.${_P}} ${_LDADD.${_P}} \
             ${DESTDIR:D-L${_GCC_LIBGCCDIR}} \  
             ${_PROGLDOPTS}              ${_PROGLDOPTS}
 .if defined(CTFMERGE)  .if defined(CTFMERGE)
         ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${_P}}          ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${_P}}
Line 323  ${_P}.ro: ${OBJS.${_P}} ${DPADD}
Line 335  ${_P}.ro: ${OBJS.${_P}} ${DPADD}
 .if defined(_PROGDEBUG.${_P})  .if defined(_PROGDEBUG.${_P})
 ${_PROGDEBUG.${_P}}: ${_P}  ${_PROGDEBUG.${_P}}: ${_P}
         ${_MKTARGET_CREATE}          ${_MKTARGET_CREATE}
         ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}}          (  ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}} \
         ${OBJCOPY} -R .gnu_debuglink --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \          && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
             || rm -f ${_PROGDEBUG.${_P}}                  --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \
           ) || (rm -f ${_PROGDEBUG.${_P}}; false)
 .endif  .endif
   
 .endif  # defined(OBJS.${_P}) && !empty(OBJS.${_P})                     # }  .endif  # defined(OBJS.${_P}) && !empty(OBJS.${_P})                     # }
Line 358  proginstall-${_P}:: ${DESTDIR}${BINDIR.$
Line 371  proginstall-${_P}:: ${DESTDIR}${BINDIR.$
                 ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}                  ${_PROGDEBUG.${_P}:D${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_PROGDEBUG.${_P}}}
   
 .if ${MKUPDATE} == "no"  .if ${MKUPDATE} == "no"
   .if defined(_RUMPINSTALL.${_P})
   ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __progrumpinstall
   .else
 ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __proginstall  ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! ${_P} __proginstall
   .endif
 .if !defined(BUILD) && !make(all) && !make(${_P})  .if !defined(BUILD) && !make(all) && !make(${_P})
 ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! .MADE  ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}! .MADE
 .endif  .endif
Line 369  ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_
Line 386  ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_
 .endif  .endif
 .endif  #  define(_PROGDEBUG.${_P})  .endif  #  define(_PROGDEBUG.${_P})
 .else   # MKUPDATE != no  .else   # MKUPDATE != no
   .if defined(_RUMPINSTALL.${_P})
   ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __progrumpinstall
   .else
 ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __proginstall  ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: ${_P} __proginstall
   .endif
 .if !defined(BUILD) && !make(all) && !make(${_P})  .if !defined(BUILD) && !make(all) && !make(${_P})
 ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: .MADE  ${DESTDIR}${BINDIR.${_P}}/${PROGNAME.${_P}}: .MADE
 .endif  .endif
Line 454  LINKSMODE?= ${BINMODE}
Line 475  LINKSMODE?= ${BINMODE}
 .include <bsd.links.mk>  .include <bsd.links.mk>
 .include <bsd.sys.mk>  .include <bsd.sys.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
   .include <bsd.clang-analyze.mk>
   
 cleanextra: .PHONY  cleanextra: .PHONY
 .if defined(CLEANFILES) && !empty(CLEANFILES)  .if defined(CLEANFILES) && !empty(CLEANFILES)

Legend:
Removed from v.1.247  
changed lines
  Added in v.1.266

CVSweb <webmaster@jp.NetBSD.org>