Expand PMF_FN_* macros.
[netbsd-mini2440.git] / gnu / lib / libgcc4 / libgcc / Makefile
blobddceccf5268b14a70ac5cddc79f266d608cac00f
1 # $NetBSD$
3 REQUIRETOOLS= yes
4 NOLINT= # defined
6 LIB= gcc
8 .include <bsd.own.mk>
10 .if ${MKGCC} != "no"
12 .cc: # disable .cc->NULL transform
14 .if !defined(MKNATIVE_LIBGCC_NEW)
16 SRCS+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
17 ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
18 .if ${MKPIC} == "no"
19 SRCS+= ${LIB2_EH}
20 .endif
22 .else # defined(MKNATIVE_LIBGCC_NEW)
24 .include "../Makefile.srcs"
26 # New style.
27 TMPLSRCS= ${TMPLSRCS.libgcc.a}
28 TMPLFPSRCS= ${TMPLFPSRCS.libgcc.a}
29 TMPLASMSRCS= ${TMPLASMSRCS.libgcc.a}
30 SRCS= ${SRCS.libgcc.a}
32 .include "../Makefile.wrapper"
34 .endif # defined(MKNATIVE_LIBGCC_NEW)
36 .include <bsd.lib.mk>
38 .if !defined(MKNATIVE_LIBGCC_NEW)
40 CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2}
42 .c.so:
43 ${_MKTARGET_COMPILE}
44 ${COMPILE.c} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp1
45 ${NM} -pg ${.TARGET}.tmp1 | \
46 ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \
47 ${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib ${CPUFLAGS} -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
48 .if defined(COPTS) && !empty(COPTS:M*-g*)
49 mv ${.TARGET}.tmp2 ${.TARGET}
50 .else
51 ${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET}
52 rm -f ${.TARGET}.tmp2
53 .endif
54 rm -f ${.TARGET}.tmp1
56 .S.so .s.so:
57 ${_MKTARGET_COMPILE}
58 ${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1
59 ${NM} -pg ${.TARGET}.tmp1 | \
60 ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \
61 ${CC} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
62 .if defined(COPTS) && !empty(COPTS:M*-g*)
63 mv ${.TARGET}.tmp2 ${.TARGET}
64 .else
65 ${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET}
66 rm -f ${.TARGET}.tmp2
67 .endif
68 rm -f ${.TARGET}.tmp1
70 .endif # !defined(MKNATIVE_LIBGCC_NEW)
72 .else
73 .include <bsd.prog.mk> # do nothing
74 .endif