etc/protocols - sync with NetBSD-8
[minix.git] / external / gpl3 / gcc / lib / libobjc / Makefile
blobaac18d4a330bc624d998035864e0630dad7e0c44
1 # $NetBSD: Makefile,v 1.13 2014/06/01 19:51:01 mrg Exp $
3 REQUIRETOOLS= yes
4 NOLINT= # defined
6 UNSUPPORTED_COMPILER.clang= # defined
8 .include <bsd.init.mk>
10 LIB= objc
11 GCC_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/}
13 .if ${MKGCC} != "no"
15 SHLIB_MAJOR= 4
16 SHLIB_MINOR= 0
18 # XXX just while all platforms defs.mk are updated..
19 .if exists(${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk)
20 # Machine-dependent definitions (include file names).
21 .include "${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk"
22 EXTRA_FAKEHEADERS=
23 .else
24 # Machine-independent definitions (include file names).
25 .include "${.CURDIR}/defs.mk"
26 EXTRA_FAKEHEADERS=
27 .endif
29 LIBGCCOBJ!= cd ${.CURDIR}/../libgcc/libgcc && ${PRINTOBJDIR}
31 DIST= ${GCCDIST}
32 GNUHOSTDIST= ${DIST}
33 GCCARCH= ${GCC_SUBDIR}/usr.bin/gcc/arch/${GCC_MACHINE_ARCH}
34 LIBOBJCARCH= ${GCC_SUBDIR}/lib/libobjc/arch/${GCC_MACHINE_ARCH}
35 GCCLIBXX= ${GCC_SUBDIR}/lib/libstdc++-v3/arch/${GCC_MACHINE_ARCH}
37 SRCS= ${G_OBJC_SOURCE_FILES} ${G_C_SOURCE_FILES}
39 GCPPFLAGS= ${G_ALL_CFLAGS} ${G_INCLUDES}
40 CPPFLAGS+= -I. -I${.CURDIR}/arch/${GCC_MACHINE_ARCH}
41 CPPFLAGS+= -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
42 CPPFLAGS+= -I${GCCLIBXX}
43 CPPFLAGS+= -I${DIST}/libobjc/objc-private
45 BUILDSYMLINKS= ${.CURDIR}/../libstdc++-v3/arch/${GCC_MACHINE_ARCH} bits
46 DPSRCS+= bits
48 .for f in Protocol.m Object.m NXConstStr.m linking.m
49 OBJCOPTS.${f}= -fgnu-runtime
50 .endfor
52 .for f in thr.c thr-objc.c
53 COPTS.${f}= -Wno-missing-noreturn
54 .endfor
56 COPTS+= -fno-strict-aliasing -fexceptions
57 OBJCOPTS+= -fno-strict-aliasing -fexceptions
59 OBJCOPTS.Object.m = -Wno-stack-protector
60 COPTS.sendmsg.c = -Wno-stack-protector
61 COPTS.objc-act.c = -Wno-stack-protector
63 INCS= ${G_OBJC_H}
64 INCSDIR= /usr/include/objc
66 DPSRCS+= runtime-info.h
67 CLEANFILES+= rtscratch rtscratch.s runtime-info.h
68 runtime-info.h:
69 ${_MKTARGET_CREATE}
70 touch rtscratch
71 `${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch >$@
73 ${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
75 ${SRCS}: tconfig.h options.h
77 .if ${HAVE_LIBGCC_EH} == "no"
78 G_CONFIGLINKS:= ${G_CONFIGLINKS:S,libgcc/config/arm/unwind-arm.h,libgcc/unwind-generic.h,}
79 .endif
81 .if ${MKGCC} != "no"
82 .if defined(G_CONFIGLINKS) && !empty(G_CONFIGLINKS)
83 BUILDSYMLINKS+= ${G_CONFIGLINKS}
84 .for _src _dst in ${G_CONFIGLINKS}
85 DPSRCS+= ${_dst}
86 .endfor
87 .endif
88 .endif
90 .include "../Makefile.tconfigh"
91 .include "../Makefile.hacks"
93 # XXX just while all platforms defs.mk are updated..
94 .if exists(${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk)
95 optionlist: ${G_ALL_OPT_FILES} ${LIBOBJCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk
96 ${TOOL_AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} \
97 > ${.TARGET}
99 .if ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "mipseb"
100 OPTION_FLAGS=-v header_name="config.h system.h coretypes.h options.h tm.h" \
101 -f ${DIST}/gcc/opt-read.awk
102 OPTION_DEPS=${DIST}/gcc/opt-read.awk
103 .endif
105 options.h: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/opth-gen.awk \
106 ${OPTION_DEPS}
107 ${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk \
108 -f ${DIST}/gcc/opth-gen.awk ${OPTION_FLAGS} \
109 < optionlist > ${.TARGET}
111 CLEANFILES+= options.h optionlist
112 .endif
114 .include <bsd.lib.mk>
116 .PATH: ${DIST}/libobjc ${DIST}/libobjc/objc ${DIST}/libobjc/objc-private
118 .else
119 .include <bsd.prog.mk> # do nothing
120 .endif
122 COPTS.archive.c+= -Wno-error
123 COPTS.sendmsg.c+= -Wno-error