Makefile revision 1.6
1# $NetBSD: Makefile,v 1.6 2012/08/06 00:19:03 matt 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# XXX handle this better? 25.if ${MACHINE} == "emips" 26G_LIB2ADD_HACK+= ${GNUHOSTDIST}/gcc/config/floatunsidf.c \ 27 ${GNUHOSTDIST}/gcc/config/floatunsisf.c 28.endif 29 30SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} ${LIB2_EHASM} \ 31 ${G_LIB2ADD:T:S/.asm/.S/} ${G_LIB2ADD_HACK:T:S/.asm/.S/} \ 32 ${LIB1ASMFUNCS} 33 34COPTS.unwind-dw2.c = -Wno-stack-protector 35 36DPADD+= libgcc.map 37CLEANFILES+= libgcc.map 38 39.include <bsd.lib.mk> 40 41.if ${MKPICLIB} != "no" 42LIBGCC_S_OBJS= ${SOBJS} 43.else 44LIBGCC_S_OBJS= ${OBJS} 45.endif 46 47libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 48 { \ 49 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 50 echo %%; \ 51 cat ${G_SHLIB_MAPFILES} | \ 52 ${TOOL_SED} -e "/^[ ]*#/d" \ 53 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ 54 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ 55 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp 56 mv ${.TARGET}.tmp ${.TARGET} 57 58.else 59.include <bsd.prog.mk> # do nothing 60.endif 61