summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libobjc/Makefile
blob: fad1687ea5f3f3e8cb8ead6ff274ce68ee61acc1 (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
# $FreeBSD$

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

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

LIB=		objc
SHLIB_MAJOR=	2

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

INCS=	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
INCSDIR=${INCLUDEDIR}/objc

CFLAGS+= -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS
CFLAGS+= -I. -I${.CURDIR}/../../usr.bin/cc/cc_tools
CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR}
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR}
CFLAGS+= -I${GCCLIB}/include
CFLAGS+= -fexceptions -frandom-seed=RepeatabilityConsideredGood
OBJCFLAGS= -fgnu-runtime ${CFLAGS}

GENHDRS= runtime-info.h

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

.for H in tconfig.h tm.h config.h options.h gthr-default.h unwind.h
$H: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
	${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
GENHDRS+=	$H
.endfor

CLEANFILES+=	${GENHDRS} cs-* optionlist
SRCS+=		${GENHDRS}

${OBJS}: ${GENHDRS}

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