Expand PMF_FN_* macros.
[netbsd-mini2440.git] / gnu / lib / libgcc4 / Makefile.wrapper
blob07a4973525c1738bd9f7ed2ec257cbdce8fbc26a
1 # $NetBSD: Makefile.wrapper,v 1.1 2009/11/30 11:47:06 uebayasi Exp $
4 # libgcc function wrapper
7 .if !empty(SRCS:M*.*)
8 ${SRCS}: ${.CURDIR}/Makefile
9         ${_MKTARGET_CREATE}
10         {       for i in ${_CPPFLAGS.${.TARGET}:C|-D||}; do \
11                         printf "#define "; echo $$i | sed -e 's,=, ,g'; \
12                 done; \
13                 printf '#include <tmplsrc_${SRCS.${.TARGET}:C|/|_|g}>\n'; \
14         } >${.TARGET}
16 DPSRCS+=        ${SRCS}
17 CLEANFILES+=    ${SRCS}
18 .else
19 .undef LIB
20 .endif
23 # libgcc functions that are built in a single file
26 .if !empty(TMPLSRCS:M*)
27 ${TMPLSRCS:C|^|tmplsrc_|}: ${.CURDIR}/Makefile
28         ${_MKTARGET_CREATE}
29         printf '#include <${.TARGET:C|^tmplsrc_||}>\n' >${.TARGET}
31 ${SRCS}:        ${TMPLSRCS:C|^|tmplsrc_|}
32 DPSRCS+=        ${TMPLSRCS:C|^|tmplsrc_|}
33 CLEANFILES+=    ${TMPLSRCS:C|^|tmplsrc_|}
34 .endif
37 # soft float functions
40 .if !empty(TMPLFPSRCS:M*)
41 ${TMPLFPSRCS:C|^|tmplsrc_|}: ${.CURDIR}/Makefile
42         ${_MKTARGET_CREATE}
43         printf '#include "${GCCARCHLIBGCC}/${.TARGET:C|^tmplsrc_||}"\n' >${.TARGET}
45 ${SRCS}:        ${TMPLFPSRCS:C|^|tmplsrc_|}
46 DPSRCS+=        ${TMPLFPSRCS:C|^|tmplsrc_|}
47 CLEANFILES+=    ${TMPLFPSRCS:C|^|tmplsrc_|}
48 .endif
51 # functions written in an asm file
54 .if !empty(TMPLASMSRCS:M*.*)
55 ${TMPLASMSRCS:C|^|tmplsrc_|:C|/|_|g}: ${.CURDIR}/Makefile
56         ${_MKTARGET_CREATE}
57         printf '#include <${G_LIB1ASMSRC}>\n' >${.TARGET}
59 ${SRCS}:        ${TMPLASMSRCS:C|^|tmplsrc_|:C|/|_|g}
60 DPSRCS+=        ${TMPLASMSRCS:C|^|tmplsrc_|:C|/|_|g}
61 CLEANFILES+=    ${TMPLASMSRCS:C|^|tmplsrc_|:C|/|_|g}
62 .endif