No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / lib / libobjc4 / Makefile
blob79d12253bab536c531a3b9ecfbc16fb8bf3d4415
1 # $NetBSD: Makefile,v 1.11 2008/10/19 22:05:20 apb Exp $
3 REQUIRETOOLS= yes
4 NOLINT= # defined
6 .include <bsd.own.mk>
8 LIB= objc
10 .if ${MKGCC} != "no"
12 SHLIB_MAJOR= 3
13 SHLIB_MINOR= 0
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"
19 EXTRA_FAKEHEADERS=
20 .else
21 # Machine-independent definitions (include file names).
22 .include "${.CURDIR}/defs.mk"
23 EXTRA_FAKEHEADERS= options.h
24 .endif
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
42 DPSRCS+= bits
44 .for f in Protocol.m Object.m NXConstStr.m linking.m
45 OBJCOPTS.${f}= -fgnu-runtime
46 .endfor
48 .for f in thr.c thr-objc.c
49 COPTS.${f}= -Wno-missing-noreturn
50 .endfor
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
58 INCS= ${G_OBJC_H}
59 INCSDIR= /usr/include/objc
61 DPSRCS+= runtime-info.h
62 CLEANFILES+= rtscratch rtscratch.s runtime-info.h
63 runtime-info.h:
64 ${_MKTARGET_CREATE}
65 touch rtscratch
66 `${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch >$@
68 .PATH: ${DIST}/libobjc ${DIST}/libobjc/objc
70 .include <bsd.lib.mk>
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
76 ${FAKEHEADERS}:
77 ${_MKTARGET_CREATE}
78 touch ${.TARGET}
79 tm.h ${SRCS}: ${FAKEHEADERS}
80 CLEANFILES+= ${FAKEHEADERS}
82 ${SRCS}: tconfig.h unwind.h options.h
84 tconfig.h:
85 ${_MKTARGET_CREATE}
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}
91 ${_MKTARGET_CREATE}
92 rm -f ${.TARGET}
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} \
101 > ${.TARGET}
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
109 .endif
111 .else
112 .include <bsd.prog.mk> # do nothing
113 .endif