Makefile revision 1.1
1# $NetBSD: Makefile,v 1.1 2015/09/23 03:03:39 mrg Exp $ 2 3.include <bsd.init.mk> 4.include <bsd.shlib.mk> 5 6LIB= liblto_plugin 7 8DIST= ${GCCDIST} 9GNUHOSTDIST= ${DIST} 10 11SRCS= lto-plugin.c hashtab.c simple-object.c pex-unix.c \ 12 pex-common.c argv.c make-temp-file.c concat.c \ 13 simple-object-elf.c simple-object-mach-o.c \ 14 simple-object-coff.c simple-object-xcoff.c 15 16CPPFLAGS+= -I${DIST}/include -I. 17CPPFLAGS+= -DHAVE_CONFIG_H 18CPPFLAGS+= -Dxstrdup=strdup -Dxexit=exit 19CPPFLAGS+= -Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc 20 21LIBISMODULE= 1 22USE_SHLIBDIR= yes 23REQUIRETOOLS= yes 24NOLINT= # defined 25 26# make this /usr/lib/gcc? 27LIBDIR= /usr/libexec 28 29.if ${MKGCC} != "no" 30 31SHLIB_MAJOR= 0 32SHLIB_MINOR= 0 33 34# Yuck, we have to run configure to generate this one... 35CLEANFILES+= config.h 36HOST_CFLAGS+= -I${.OBJDIR} 37DPSRCS+= config.h 38config.h: Makefile 39 ${_MKTARGET_CREATE} 40 rm -rf .ab && \ 41 mkdir .ab && \ 42 (cd .ab && \ 43 AWK=${TOOL_AWK:Q} \ 44 CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} \ 45 MAKE=${MAKE:Q} \ 46 CONFIG_SHELL=${HOST_SH:Q} \ 47 ${HOST_SH} ${DIST}/libiberty/configure \ 48 --build=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ 49 --host=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ 50 --target=${MACHINE_GNU_PLATFORM} && \ 51 mv ${.TARGET} ../${.TARGET}) && \ 52 rm -rf .ab 53 54.include <bsd.lib.mk> 55 56.PATH: ${DIST}/lto-plugin ${DIST}/libiberty 57 58.else 59.include <bsd.prog.mk> # do nothing 60.endif 61