Makefile revision 1.4.2.1 1 1.4.2.1 perseant # $NetBSD: Makefile,v 1.4.2.1 2024/07/01 01:01:06 perseant Exp $
2 1.1 mrg
3 1.1 mrg # XXX: Pull this (G_OBJCXX_OBJS) out with mknative-gcc. Needs some
4 1.1 mrg # minor re-org of cc1plus and perhaps cc1obj. G_CXX_AND_OBJCXX_OBJS
5 1.1 mrg # is reverse-derived from G_CXX_OBJS for now - when G_OBJCXX_OBJS is
6 1.1 mrg # pulled out by mknative-gcc, it will include G_CXX_AND_OBJCXX_OBJS.
7 1.1 mrg G_CXX_AND_OBJCXX_OBJS= ${G_CXX_OBJS:S,cp-lang.o,,:S,c-family/stub-objc.o,,}
8 1.1 mrg G_OBJCXX_OBJS= \
9 1.1 mrg objcp-act.o \
10 1.1 mrg objcp-lang.o \
11 1.1 mrg objcp/objcp-decl.o \
12 1.1 mrg objcp/objc-runtime-shared-support.o \
13 1.1 mrg objcp/objc-gnu-runtime-abi-01.o \
14 1.1 mrg objcp/objc-next-runtime-abi-01.o \
15 1.1 mrg objcp/objc-next-runtime-abi-02.o \
16 1.1 mrg objcp/objc-encoding.o \
17 1.1 mrg objcp/objc-map.o \
18 1.1 mrg ${G_CXX_AND_OBJCXX_OBJS}
19 1.1 mrg
20 1.4 mrg BUILDSYMLINKS+= ${DIST}/gcc/objc/objc-act.cc objcp-act.cc \
21 1.4 mrg ${DIST}/gcc/objc/objc-lang.cc objcp-lang.cc
22 1.1 mrg
23 1.1 mrg MYOBJS= ${G_OBJCXX_OBJS}
24 1.1 mrg MY2OBJS= ${MYOBJS:S,objcp/,,:S,objc/,,:S,cp/,,:S,c-family/,,:S,c/,,}
25 1.1 mrg PROG= cc1objplus
26 1.4 mrg SRCS= ${MY2OBJS:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:S,coroutines.o,coroutines.cc,:Nlibcpp.a:.o=.cc}
27 1.4 mrg SRCS+= main.cc ${PROG}-checksum.cc
28 1.1 mrg
29 1.1 mrg
30 1.1 mrg CPPFLAGS+= -I${DIST}/gcc/objc
31 1.1 mrg CPPFLAGS+= -I${DIST}/gcc/objcp
32 1.1 mrg CPPFLAGS+= -I${DIST}/gcc/cp
33 1.1 mrg CPPFLAGS+= -DOBJCPLUS
34 1.4 mrg CPPFLAGS.prefix.cc+= -DPREFIX=\"/usr\"
35 1.4 mrg CPPFLAGS.module.cc+= -DTARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
36 1.4 mrg -DHOST_MACHINE=\"${MACHINE_GNU_PLATFORM}\"
37 1.1 mrg
38 1.1 mrg .include "../Makefile.backend"
39 1.1 mrg .include "../Makefile.backtrace"
40 1.4 mrg .include "../Makefile.libcody"
41 1.1 mrg .include "../Makefile.libcpp"
42 1.1 mrg .include "../Makefile.libdecnumber"
43 1.1 mrg
44 1.1 mrg CHECKSUM_OBJS= ${BACKENDOBJ}/libbackend.a \
45 1.1 mrg main.o \
46 1.1 mrg ${LIBBACKTRACEOBJ}/libbacktrace.a \
47 1.1 mrg ${COMMONTARGETOBJ}/libcommon-target.a \
48 1.1 mrg ${COMMONOBJ}/libcommon.a \
49 1.1 mrg ${LIBCPPOBJ}/libcpp.a \
50 1.1 mrg ${LIBDECNUMBEROBJ}/libdecnumber.a \
51 1.1 mrg ${LIBIBERTYOBJ}/libiberty.a \
52 1.1 mrg ${MY2OBJS} \
53 1.1 mrg checksum-options
54 1.1 mrg
55 1.1 mrg .include "../Makefile.checksum"
56 1.1 mrg
57 1.2 christos # XXX: like cc1plus
58 1.2 christos CFLAGS+=-Wno-error=stack-protector
59 1.2 christos
60 1.4.2.1 perseant COPTS.c-ada-spec.cc+= -Wno-error=stack-protector
61 1.4.2.1 perseant COPTS.c-attribs.cc+= -Wno-error=stack-protector
62 1.4.2.1 perseant COPTS.c-aux-info.cc+= -Wno-error=stack-protector
63 1.4.2.1 perseant COPTS.c-common.cc+= -Wno-error=stack-protector
64 1.4.2.1 perseant COPTS.c-cppbuiltin.cc+= -Wno-error=stack-protector
65 1.4.2.1 perseant COPTS.c-decl.cc+= -Wno-error=stack-protector
66 1.4.2.1 perseant COPTS.c-format.cc+= -Wno-error=stack-protector
67 1.4.2.1 perseant COPTS.c-lex.cc+= -Wno-error=stack-protector
68 1.4.2.1 perseant COPTS.c-omp.cc+= -Wno-error=stack-protector
69 1.4.2.1 perseant COPTS.c-ppoutput.cc+= -Wno-error=stack-protector
70 1.4.2.1 perseant COPTS.c-pretty-print.cc+= -Wno-error=stack-protector
71 1.4.2.1 perseant COPTS.c-pragma.cc+= -Wno-error=stack-protector
72 1.4.2.1 perseant COPTS.c-typeck.cc+= -Wno-error=stack-protector
73 1.4.2.1 perseant COPTS.objc-act.cc+= -Wno-error=stack-protector
74 1.4.2.1 perseant COPTS.objc-gnu-runtime-abi-01.cc+= -Wno-error=stack-protector
75 1.4.2.1 perseant COPTS.objc-next-runtime-abi-01.cc+= -Wno-error=stack-protector
76 1.1 mrg
77 1.4 mrg .if ${MACHINE_ARCH} == "vax" && 0
78 1.1 mrg COPTS.c-decl.c+=-O0
79 1.1 mrg COPTS.c-typeck.c+=-O0
80 1.1 mrg COPTS.c-array-notation.c+=-O0
81 1.1 mrg COPTS.c-common.c+=-O0
82 1.1 mrg COPTS.c-ada-spec.c+=-O0
83 1.1 mrg COPTS.cilk.c+=-O0
84 1.1 mrg COPTS.c-ubsan.c+=-O0
85 1.1 mrg COPTS.cc1obj-checksum.c+=-O0
86 1.1 mrg COPTS.decl.c+=-O0
87 1.1 mrg .endif
88 1.1 mrg
89 1.3 christos .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
90 1.4 mrg #COPTS.c-common.cc+=-O3
91 1.1 mrg .endif
92 1.1 mrg
93 1.1 mrg LDADD+= ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
94 1.1 mrg DPADD+= ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}
95 1.1 mrg
96 1.1 mrg .PATH: ${DIST}/gcc/objcp ${DIST}/gcc/objc ${DIST}/gcc/c ${DIST}/gcc/c-family
97 1.1 mrg .PATH: ${DIST}/gcc/cp ${DIST}/gcc ${DIST}/gcc/config
98 1.1 mrg .PATH: ${G_out_file:H}
99