summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libobjc/Makefile
blob: da9badd1b83a16517b98c7fd280f5cba9b7ab05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $FreeBSD$

OBJCDIR=${.CURDIR}/../../../contrib/libobjc.295
GCCDIR=	${.CURDIR}/../../../contrib/gcc.295

.PATH: ${OBJCDIR}/objc ${OBJCDIR}

LIB=    objc
NOMAN=	sorry
NOPIC=	works but method lookup slowdown is significant

SRCS=   archive.c class.c encoding.c gc.c hash.c init.c misc.c \
	nil_method.c objects.c sarray.c selector.c sendmsg.c \
	thr.c thr-single.c \
	NXConstStr.m Object.m Protocol.m linking.m

HDRS=	encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \
	sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h

CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR} -I.
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR}

beforeinstall:
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
	    ${HDRS:S;^;${OBJCDIR}/objc/;} ${DESTDIR}/usr/include/objc

GENHDRS=	runtime-info.h tconfig.h tm.h 
CLEANFILES+=	${GENHDRS}
SRCS+=		${GENHDRS}

${OBJS}: ${GENHDRS}

runtime-info.h:
	`${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \
	    < /dev/null > ${.TARGET}

tconfig.h:
	echo '#include "gansidecl.h"'				> ${.TARGET}
	echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"'	>> ${.TARGET}

#	KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !!
tm.h:
	echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"'	> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
	echo '#include "${MACHINE_ARCH}/att.h"'			>> ${.TARGET}
.endif
	echo '#include <freebsd.h>'				>> ${.TARGET}
	echo '#include "${MACHINE_ARCH}/freebsd.h"'		>> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
	echo '#include "${MACHINE_ARCH}/perform.h"'		>> ${.TARGET}
.endif

.include <bsd.lib.mk>
OpenPOWER on IntegriCloud