1 # $DragonFly: src/share/mk/bsd.hostprog.mk,v 1.8 2008/05/19 10:26:02 corecode Exp $
5 .SUFFIXES
: .out .nx .no .c .
cc .
cpp .
cxx .C .m .y .l .s .S
19 all: objwarn
${PROG}.nx
23 # If there are Objective C sources, link with Objective C libraries.
24 .if
${SRCS
:M
*.m
} != ""
29 OBJS
+= ${SRCS
:N
*.h
:N
*.patch
:R
:S
/$/.no
/g
}
30 .for _PATCH in
${SRCS
:T
:N
*.h.patch
:M
*.patch
}
31 .for _OBJ in
${_PATCH
:R
:R
:S
/$/.no
/}
32 OBJS
:= ${OBJS
:N
${_OBJ}} ${_OBJ}
38 ${NXCXX_LINK} ${NXCXXFLAGS} ${NXLDFLAGS} -o
${.TARGET
} ${OBJS} ${LDADD}
40 ${NXCC_LINK} ${NXCFLAGS} ${NXLDFLAGS} -o
${.TARGET
} ${OBJS} ${LDADD}
44 CLEANFILES
+= ${PROG}.nx
${OBJS}
49 sed
-i
'' -Ee
's/^([^.]+)\.o:/\1.no:/' ${DEPENDFILE}
50 echo
${PROG}.nx
: ${LIBC} ${DPADD} >> ${DEPENDFILE}
52 echo
${PROG}.nx
: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
55 # header files are often generated by .nx binaries. All .nx binaries must
56 # be built in the depend stage so the related header files can be generated
62 .if defined
(PROG
) && !exists
(${.OBJDIR
}/${DEPENDFILE})