1 # $NetBSD: Makefile,v 1.11 2008/10/19 22:05:20 apb Exp $
15 # XXX just while all platforms defs.mk are updated..
16 .if exists
(${.CURDIR
}/arch
/${MACHINE_ARCH}/defs.mk
)
17 # Machine-dependent definitions (include file names).
18 .
include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
21 # Machine-independent definitions (include file names).
22 .
include "${.CURDIR}/defs.mk"
23 EXTRA_FAKEHEADERS
= options.h
26 LIBGCCOBJ
!= cd
${.CURDIR
}/..
/libgcc4
/libgcc
&& ${PRINTOBJDIR}
28 DIST
= ${NETBSDSRCDIR}/gnu
/dist/gcc4
29 GNUHOSTDIST
= ${NETBSDSRCDIR}/gnu
/dist/gcc4
30 GCCARCH
= ${NETBSDSRCDIR}/gnu
/usr.bin
/gcc4
/arch
/${MACHINE_ARCH}
31 LIBOBJCARCH
= ${NETBSDSRCDIR}/gnu
/lib
/libobjc4
/arch
/${MACHINE_ARCH}
32 GCCLIBXX
= ${NETBSDSRCDIR}/gnu
/lib
/libstdc
++-v3_4
/arch
/${MACHINE_ARCH}
34 SRCS
= ${G_OBJS
:N
[A-Z
]*:Nlinking.lo
:.lo
=.c
} ${G_OBJS
:M
[A-Z
]*:.lo
=.m
} linking.m
36 GCPPFLAGS
= ${G_ALL_CFLAGS} ${G_INCLUDES}
37 CPPFLAGS
+= -I.
-I
${.CURDIR
}/arch
/${MACHINE_ARCH}
38 CPPFLAGS
+= -I
${GCCARCH} ${GCPPFLAGS
:M-D
*} ${GCPPFLAGS
:M-I
*:N-I.
*}
39 CPPFLAGS
+= -I
${GCCLIBXX}
41 BUILDSYMLINKS
= ${.CURDIR
}/..
/libstdc
++-v3_4
/arch
/${MACHINE_ARCH} bits
44 .for f in Protocol.m Object.m NXConstStr.m linking.m
45 OBJCOPTS.
${f}= -fgnu-runtime
48 .for f in thr.c thr-objc.c
49 COPTS.
${f}= -Wno-missing-noreturn
52 COPTS
+= -fno-strict-aliasing
-fexceptions
53 OBJCOPTS
+= -fno-strict-aliasing
-fexceptions
55 OBJCOPTS.Object.m
= -Wno-stack-protector
56 COPTS.sendmsg.c
= -Wno-stack-protector
59 INCSDIR
= /usr
/include/objc
61 DPSRCS
+= runtime-info.h
62 CLEANFILES
+= rtscratch rtscratch.s runtime-info.h
66 `${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch
>$@
68 .PATH
: ${DIST}/libobjc
${DIST}/libobjc
/objc
72 ${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
74 # these aren't necessary but are #include'd
75 FAKEHEADERS
= ${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h
79 tm.h
${SRCS}: ${FAKEHEADERS}
80 CLEANFILES
+= ${FAKEHEADERS}
82 ${SRCS}: tconfig.h unwind.h options.h
86 TARGET_CPU_DEFAULT
="" \
87 HEADERS
="$(G_xm_include_list)" DEFINES
="USED_FOR_TARGET $(G_xm_defines)" \
88 ${HOST_SH} $(GNUHOSTDIST
)/gcc
/mkconfig.sh tconfig.h
90 unwind.h
: ${G_UNWIND_H}
93 ln
-s
${G_UNWIND_H} ${.TARGET
}
95 CLEANFILES
+= cs-tconfig.h tconfig.h unwind.h
97 # XXX just while all platforms defs.mk are updated..
98 .if exists
(${.CURDIR
}/arch
/${MACHINE_ARCH}/defs.mk
)
99 optionlist
: ${G_ALL_OPT_FILES} ${LIBOBJCARCH}/defs.mk Makefile
${DIST}/gcc
/opt-gather.awk
100 ${TOOL_AWK} -f
${DIST}/gcc
/opt-gather.awk
${G_ALL_OPT_FILES} \
103 options.h
: optionlist
${DIST}/gcc
/opt-functions.awk
${DIST}/gcc
/opth-gen.awk
104 ${TOOL_AWK} -f
${DIST}/gcc
/opt-functions.awk \
105 -f
${DIST}/gcc
/opth-gen.awk \
106 < optionlist
> ${.TARGET
}
108 CLEANFILES
+= options.h optionlist
112 .
include <bsd.prog.mk
> # do nothing