1 # $NetBSD: Makefile.wrapper,v 1.1 2009/11/30 11:47:06 uebayasi Exp $
4 # libgcc function wrapper
8 ${SRCS}: ${.CURDIR}/Makefile
10 { for i in ${_CPPFLAGS.${.TARGET}:C|-D||}; do \
11 printf "#define "; echo $$i | sed -e 's,=, ,g'; \
13 printf '#include <tmplsrc_${SRCS.${.TARGET}:C|/|_|g}>\n'; \
23 # libgcc functions that are built in a single file
26 .if !empty(TMPLSRCS:M*)
27 ${TMPLSRCS:C|^|tmplsrc_|}: ${.CURDIR}/Makefile
29 printf '#include <${.TARGET:C|^tmplsrc_||}>\n' >${.TARGET}
31 ${SRCS}: ${TMPLSRCS:C|^|tmplsrc_|}
32 DPSRCS+= ${TMPLSRCS:C|^|tmplsrc_|}
33 CLEANFILES+= ${TMPLSRCS:C|^|tmplsrc_|}
37 # soft float functions
40 .if !empty(TMPLFPSRCS:M*)
41 ${TMPLFPSRCS:C|^|tmplsrc_|}: ${.CURDIR}/Makefile
43 printf '#include "${GCCARCHLIBGCC}/${.TARGET:C|^tmplsrc_||}"\n' >${.TARGET}
45 ${SRCS}: ${TMPLFPSRCS:C|^|tmplsrc_|}
46 DPSRCS+= ${TMPLFPSRCS:C|^|tmplsrc_|}
47 CLEANFILES+= ${TMPLFPSRCS:C|^|tmplsrc_|}
51 # functions written in an asm file
54 .if !empty(TMPLASMSRCS:M*.*)
55 ${TMPLASMSRCS:C|^|tmplsrc_|:C|/|_|g}: ${.CURDIR}/Makefile
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}