[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.243 and 1.257.2.2

version 1.243, 2009/11/27 11:44:36 version 1.257.2.2, 2011/02/17 11:59:27
Line 53  LDFLAGS+= ${PIE_LDFLAGS}
Line 53  LDFLAGS+= ${PIE_LDFLAGS}
 .endif  .endif
   
 ##### Default values  ##### Default values
   .if !defined(HOSTLIB)
 .if empty(CPPFLAGS:M-nostdinc)  .if empty(CPPFLAGS:M-nostdinc)
 CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}  CPPFLAGS+=      ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
 .endif  .endif
 .if empty(CXXFLAGS:M-nostdinc++)  .if empty(CXXFLAGS:M-nostdinc++)
 CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}  CXXFLAGS+=      ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
 .endif  .endif
   .endif
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
 OBJCFLAGS+=     ${OBJCOPTS}  OBJCFLAGS+=     ${OBJCOPTS}
 MKDEP_SUFFIXES?=        .o .ln  MKDEP_SUFFIXES?=        .o .ln
   
   # CTF preserve debug symbols
   .if defined(MKDTRACE) && (${MKDTRACE} != "no") && (${CFLAGS:M-g} != "")
   CTFFLAGS+= -g
   CTFMFLAGS+= -g
   .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 74  LIBCRTEND= ${_GCC_CRTEND} ${DESTDIR}/usr
Line 82  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 97  LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
Line 100  LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
         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 heimntlm hx509 intl ipsec \
         kadm5clnt kadm5srv kafs krb5 kvm l lber ldap ldap_r \          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 \
Line 161  CPPFLAGS+= -DRESCUEDIR=\"${RESCUEDIR}\"
Line 164  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-link,${DESTDIR}${SHLIBDIR} \
                 -R${SHLIBDIR} \                  -Wl,-rpath,${SHLIBDIR} \
                 -L${DESTDIR}${SHLIBDIR}                  -L${DESTDIR}${SHLIBDIR}
 .elif ${SHLIBINSTALLDIR} != "/usr/lib"  .elif ${SHLIBINSTALLDIR} != "/usr/lib"
 _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \  _PROGLDOPTS+=   -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR} \
Line 181  __proginstall: .USE
Line 182  __proginstall: .USE
         ${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 206  PROG=  ${PROG_CXX}
Line 212  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 226  _APPEND_SRCS= no
Line 254  _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 256  _CCLINK.${_P}= ${CXX} ${_CCLINKFLAGS}
Line 284  _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 265  PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS}
Line 293  PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS}
 .endif  .endif
   
 ##### PROG specific flags.  ##### PROG specific flags.
 COPTS+=     ${COPTS.${_P}}  
 CPPFLAGS+=  ${CPPFLAGS.${_P}}  
 CXXFLAGS+=  ${CXXFLAGS.${_P}}  
 OBJCOPTS+=  ${OBJCOPTS.${_P}}  
 LDADD+=     ${LDADD.${_P}}  
 LDFLAGS+=   ${LDFLAGS.${_P}}  
 LDSTATIC+=  ${LDSTATIC.${_P}}  
   
 _COPTS.${_P}=           ${COPTS}    ${COPTS.${_P}}  
 _CPPFLAGS.${_P}=        ${CPPFLAGS} ${CPPFLAGS.${_P}}  
 _CXXFLAGS.${_P}=        ${CXXFLAGS} ${CXXFLAGS.${_P}}  
 _OBJCOPTS.${_P}=        ${OBJCOPTS} ${OBJCOPTS.${_P}}  
 _LDADD.${_P}=           ${LDADD}    ${LDADD.${_P}}  _LDADD.${_P}=           ${LDADD}    ${LDADD.${_P}}
 _LDFLAGS.${_P}=         ${LDFLAGS}  ${LDFLAGS.${_P}}  _LDFLAGS.${_P}=         ${LDFLAGS}  ${LDFLAGS.${_P}}
 _LDSTATIC.${_P}=        ${LDSTATIC} ${LDSTATIC.${_P}}  _LDSTATIC.${_P}=        ${LDSTATIC} ${LDSTATIC.${_P}}
Line 310  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
Line 327  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
             ${OBJS.${_P}} ${_LDADD.${_P}} \              ${OBJS.${_P}} ${_LDADD.${_P}} \
             ${DESTDIR:D-L${_GCC_LIBGCCDIR}} \              ${DESTDIR:D-L${_GCC_LIBGCCDIR}} \
             ${_PROGLDOPTS}              ${_PROGLDOPTS}
   .if defined(CTFMERGE)
           ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${_P}}
   .endif
 .if defined(PAXCTL_FLAGS.${_P})  .if defined(PAXCTL_FLAGS.${_P})
         ${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}          ${PAXCTL} ${PAXCTL_FLAGS.${_P}} ${.TARGET}
 .endif  .endif
Line 320  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
Line 340  ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}}
   
 ${_P}.ro: ${OBJS.${_P}} ${DPADD}  ${_P}.ro: ${OBJS.${_P}} ${DPADD}
         ${_MKTARGET_LINK}          ${_MKTARGET_LINK}
         ${LD} -r -dc -o ${.TARGET} ${OBJS.${_P}}          ${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}
   
 .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 360  proginstall-${_P}:: ${DESTDIR}${BINDIR.$
Line 381  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 371  ${DESTDIR}${DEBUGDIR}${BINDIR.${_P}}/${_
Line 396  ${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

Legend:
Removed from v.1.243  
changed lines
  Added in v.1.257.2.2

CVSweb <webmaster@jp.NetBSD.org>