Expand PMF_FN_* macros.
[netbsd-mini2440.git] / gnu / lib / libgcc4 / libgcc_s / Makefile
blob17622806fcaad20a958986c3c0c7715e7175cdf5
1 # $NetBSD$
3 USE_SHLIBDIR= yes
4 REQUIRETOOLS= yes
5 NOLINT= # defined
7 LIB= gcc_s
8 NOSTATICLIB= # defined
9 NOPROFILE= # defined
10 NOPICINSTALL= # defined
12 .include <bsd.own.mk>
14 .if ${MKGCC} != "no"
16 .cc: # disable .cc->NULL transform
18 SHLIB_MAJOR= 1
19 SHLIB_MINOR= 0
21 LDFLAGS+= -nodefaultlibs
22 LDFLAGS+= -Wl,--version-script=${.OBJDIR}/libgcc.map
24 .if !defined(MKNATIVE_LIBGCC_NEW)
26 SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \
27 ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
29 .else # defined(MKNATIVE_LIBGCC_NEW)
31 .include "../Makefile.srcs"
33 # New style.
34 TMPLSRCS= ${TMPLSRCS.libgcc_s.so}
35 TMPLFPSRCS= ${TMPLFPSRCS.libgcc_s.so}
36 TMPLASMSRCS= ${TMPLASMSRCS.libgcc_s.so}
37 SRCS= ${SRCS.libgcc_s.so}
39 .include "../Makefile.wrapper"
41 .endif # defined(MKNATIVE_LIBGCC_NEW)
43 COPTS.unwind-dw2.c = -Wno-stack-protector
45 DPADD+= libgcc.map
46 CLEANFILES+= libgcc.map
48 .include <bsd.lib.mk>
50 .if ${MKPICLIB} != "no"
51 LIBGCC_S_OBJS= ${SOBJS}
52 .else
53 LIBGCC_S_OBJS= ${OBJS}
54 .endif
56 libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES}
57 { \
58 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \
59 echo %%; \
60 cat ${G_SHLIB_MAPFILES} | \
61 ${TOOL_SED} -e "/^[ ]*#/d" \
62 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \
63 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \
64 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp
65 mv ${.TARGET}.tmp ${.TARGET}
67 .else
68 .include <bsd.prog.mk> # do nothing
69 .endif