1# $NetBSD: Makefile,v 1.22 2024/06/30 16:15:03 christos Exp $ 2 3PROG= cc1 4SRCS= ${G_C_OBJS:S,c-family/,,:S,c/,,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.cc} 5SRCS+= main.cc ${PROG}-checksum.cc 6CPPFLAGS+= -DPREFIX=\"/usr\" 7 8.include "../Makefile.backend" 9.include "../Makefile.backtrace" 10.include "../Makefile.libcpp" 11.include "../Makefile.libdecnumber" 12 13CHECKSUM_OBJS= ${BACKENDOBJ}/libbackend.a \ 14 main.o \ 15 ${LIBBACKTRACEOBJ}/libbacktrace.a \ 16 ${COMMONTARGETOBJ}/libcommon-target.a \ 17 ${COMMONOBJ}/libcommon.a \ 18 ${LIBCPPOBJ}/libcpp.a \ 19 ${LIBDECNUMBEROBJ}/libdecnumber.a \ 20 ${LIBIBERTYOBJ}/libiberty.a \ 21 ${G_C_OBJS:S,c-family/,,:S,c/,,} \ 22 checksum-options 23 24.include "../Makefile.checksum" 25 26# XXX check this out, probably need it for plugins? 27# LDFLAGS+= -rdynamic 28 29COPTS.c-ada-spec.cc= -Wno-error=stack-protector 30COPTS.c-attribs.cc= -Wno-error=stack-protector 31COPTS.c-aux-info.cc= -Wno-error=stack-protector 32COPTS.c-common.cc= -Wno-error=stack-protector 33COPTS.c-cppbuiltin.cc= -Wno-error=stack-protector 34COPTS.c-decl.cc= -Wno-error=stack-protector 35COPTS.c-format.cc= -Wno-error=stack-protector 36COPTS.c-lex.cc= -Wno-error=stack-protector 37COPTS.c-omp.cc= -Wno-error=stack-protector 38COPTS.c-opts.cc= -Wno-error=stack-protector 39COPTS.c-ppoutput.cc= -Wno-error=stack-protector 40COPTS.c-pragma.cc= -Wno-error=stack-protector 41COPTS.c-pretty-print.cc= -Wno-error=stack-protector 42COPTS.c-typeck.cc= -Wno-error=stack-protector 43 44CPPFLAGS.default-c.cc+= -I${BACKENDOBJ} 45 46.if ${MACHINE_CPU} == "sh3" 47BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c 48.endif 49 50.if ${MACHINE_CPU} == "vax" && 0 51COPTS.c-decl.c+=-O0 52COPTS.c-typeck.c+=-O0 53COPTS.c-array-notation.c+=-O0 54COPTS.c-common.c+=-O0 55COPTS.c-ada-spec.c+=-O0 56COPTS.cilk.c+=-O0 57COPTS.c-ubsan.c+=-O0 58COPTS.cc1-checksum.c+=-O0 59.endif 60 61.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" 62#COPTS.c-common.cc+=-O3 63.endif 64 65LDADD+= ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm 66DPADD+= ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM} 67 68.PATH: ${DIST}/gcc ${DIST}/gcc/c ${DIST}/gcc/c-family ${DIST}/gcc/config 69.PATH: ${G_out_file:H} 70