Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.272 retrieving revision 1.278.2.1 diff -u -p -r1.272 -r1.278.2.1 --- src/share/mk/bsd.prog.mk 2012/02/20 18:23:50 1.272 +++ src/share/mk/bsd.prog.mk 2013/02/25 00:28:17 1.278.2.1 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.272 2012/02/20 18:23:50 matt Exp $ +# $NetBSD: bsd.prog.mk,v 1.278.2.1 2013/02/25 00:28:17 tls Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -33,12 +33,18 @@ CLEANFILES+=strings .c.o: ${CC} -E ${CPPFLAGS} ${CFLAGS} ${.IMPSRC} | xstr -c - @${CC} ${CPPFLAGS} ${CFLAGS} -c x.c -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif @rm -f x.c .cc.o .cpp.o .cxx.o .C.o: ${CXX} -E ${CPPFLAGS} ${CXXFLAGS} ${.IMPSRC} | xstr -c - @mv -f x.c x.cc @${CXX} ${CPPFLAGS} ${CXXFLAGS} -c x.cc -o ${.TARGET} +.if defined(CTFCONVERT) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif @rm -f x.cc .endif @@ -49,6 +55,9 @@ LDFLAGS+= ${PIE_LDFLAGS} .endif CFLAGS+= ${COPTS} +.if defined(MKDEBUG) && (${MKDEBUG} != "no") +CFLAGS+= -g +.endif OBJCFLAGS+= ${OBJCOPTS} MKDEP_SUFFIXES?= .o .ln @@ -107,6 +116,7 @@ LIBCRT0= ${DESTDIR}/usr/lib/crt0.o dns \ edit \ event \ + expat \ fetch \ fl \ form \ @@ -246,7 +256,6 @@ PAM_STATIC_DPADD= Xxf86misc \ Xxf86vm \ dps \ - expat \ fntstubs \ fontcache \ fontconfig \ @@ -310,24 +319,34 @@ _CCLINK= ${CXX} ${_CCLINKFLAGS} .if defined(RUMPPRG) PROG= ${RUMPPRG} -.ifndef CRUNCHEDPROG +. ifndef CRUNCHEDPROG +. if (${MKRUMP} != "no") PROGS= ${RUMPPRG} rump.${RUMPPRG} -. if defined(SRCS) +. else +PROGS= ${RUMPPRG} +. endif +. if defined(SRCS) +. if (${MKRUMP} != "no") SRCS.rump.${PROG}:= ${SRCS} ${PROG}_rumpops.c ${RUMPSRCS} +. endif SRCS+= ${PROG}_hostops.c -. else +. else SRCS= ${PROG}.c ${PROG}_hostops.c +. if (${MKRUMP} != "no") SRCS.rump.${PROG}= ${PROG}.c ${PROG}_rumpops.c ${RUMPSRCS} -. endif +. endif +. endif +. if (${MKRUMP} != "no") 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 +. endif +. else # CRUNCHEDPROG PROGS= ${PROG} CPPFLAGS+= -DCRUNCHOPS -.endif +. endif .endif .if defined(PROG) @@ -358,6 +377,23 @@ PROGS= ${PROG} . endif .endif +##### Libraries that this may depend upon. +.if defined(PROGDPLIBS) # { +.for _lib _dir in ${PROGDPLIBS} +.if !defined(BINDO.${_lib}) +PROGDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR} +.MAKEOVERRIDES+=PROGDO.${_lib} +.endif +LDADD+= -L${PROGDO.${_lib}} -l${_lib} +.if exists(${PROGDO.${_lib}}/lib${_lib}_pic.a) +DPADD+= ${PROGDO.${_lib}}/lib${_lib}_pic.a +.elif exists(${PROGDO.${_lib}}/lib${_lib}.so) +DPADD+= ${PROGDO.${_lib}}/lib${_lib}.so +.else +DPADD+= ${PROGDO.${_lib}}/lib${_lib}.a +.endif +.endfor +.endif # } # # Per-program definitions and targets. # @@ -395,6 +431,7 @@ PAXCTL_FLAGS.${_P}?= ${PAXCTL_FLAGS} ##### PROG specific flags. +_DPADD.${_P}= ${DPADD} ${DPADD.${_P}} _LDADD.${_P}= ${LDADD} ${LDADD.${_P}} _LDFLAGS.${_P}= ${LDFLAGS} ${LDFLAGS.${_P}} _LDSTATIC.${_P}= ${LDSTATIC} ${LDSTATIC.${_P}} @@ -435,7 +472,7 @@ NODPSRCS+= ${f} .endif .endfor -${_P}: .gdbinit ${LIBCRT0} ${XOBJS.${_P}} ${SRCS.${_P}} ${DPSRCS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD} +${_P}: .gdbinit ${LIBCRT0} ${XOBJS.${_P}} ${SRCS.${_P}} ${DPSRCS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${_DPADD.${_P}} ${_MKTARGET_LINK} .if defined(DESTDIR) ${_CCLINK.${_P}} -Wl,-nostdlib \ @@ -468,14 +505,13 @@ CLEANFILES+= ${_P}.d ${OBJS.${_P}} ${LOBJS.${_P}}: ${DPSRCS} -${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD} +${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${_DPADD.${_P}} .if !commands(${_P}) ${_MKTARGET_LINK} ${_CCLINK.${_P}} \ ${_LDFLAGS.${_P}} ${_LDSTATIC.${_P}} -o ${.TARGET} \ ${OBJS.${_P}} ${_LDADD.${_P}} \ ${_PROGLDOPTS} - @${SIZE} ${_P} .if defined(CTFMERGE) ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${_P}} .endif @@ -488,7 +524,7 @@ ${_P}: .gdbinit ${LIBCRT0} ${OBJS.${_P}} .endif # !commands(${_P}) .endif # USE_COMBINE -${_P}.ro: ${OBJS.${_P}} ${DPADD} +${_P}.ro: ${OBJS.${_P}} ${_DPADD.${_P}} ${_MKTARGET_LINK} ${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}