Makefile revision 1.1
1# $NetBSD: Makefile,v 1.1 2011/06/21 06:02:26 mrg Exp $ 2 3USE_SHLIBDIR= yes 4REQUIRETOOLS= yes 5NOLINT= # defined 6 7LIB= gcc_s 8NOSTATICLIB= # defined 9NOPROFILE= # defined 10NOPICINSTALL= # defined 11 12.include <bsd.own.mk> 13 14.if ${MKGCC} != "no" 15 16.cc: # disable .cc->NULL transform 17 18SHLIB_MAJOR= 1 19SHLIB_MINOR= 0 20 21LDFLAGS+= -nodefaultlibs 22LDFLAGS+= -Wl,--version-script=${.OBJDIR}/libgcc.map 23 24.if !defined(MKNATIVE_LIBGCC_NEW) 25 26SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \ 27 ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS} 28 29.else # defined(MKNATIVE_LIBGCC_NEW) 30 31.include "../Makefile.srcs" 32 33# New style. 34TMPLSRCS= ${TMPLSRCS.libgcc_s.so} 35TMPLFPSRCS= ${TMPLFPSRCS.libgcc_s.so} 36TMPLASMSRCS= ${TMPLASMSRCS.libgcc_s.so} 37SRCS= ${SRCS.libgcc_s.so} 38 39.include "../Makefile.wrapper" 40 41.endif # defined(MKNATIVE_LIBGCC_NEW) 42 43COPTS.unwind-dw2.c = -Wno-stack-protector 44 45DPADD+= libgcc.map 46CLEANFILES+= libgcc.map 47 48.include <bsd.lib.mk> 49 50.if ${MKPICLIB} != "no" 51LIBGCC_S_OBJS= ${SOBJS} 52.else 53LIBGCC_S_OBJS= ${OBJS} 54.endif 55 56libgcc.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} 66 67.else 68.include <bsd.prog.mk> # do nothing 69.endif 70