Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / lib / libobjc / Makefile
1 # $FreeBSD: src/gnu/lib/libobjc/Makefile,v 1.9.2.3 2002/07/22 14:21:45 ru Exp $
2
3 OBJCDIR=${.CURDIR}/../../../contrib/libobjc
4 GCCDIR= ${.CURDIR}/../../../contrib/gcc
5
6 .PATH: ${OBJCDIR}/objc ${OBJCDIR}
7
8 LIB=    objc
9 NOMAN=  sorry
10 NOPIC=  works but method lookup slowdown is significant
11
12 SRCS=   archive.c class.c encoding.c gc.c hash.c init.c misc.c \
13         nil_method.c objects.c sarray.c selector.c sendmsg.c \
14         thr.c thr-single.c \
15         NXConstStr.m Object.m Protocol.m linking.m
16
17 INCS=   encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \
18         sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h
19 INCSDIR=${INCLUDEDIR}/objc
20
21 CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR} -I.
22 CFLAGS+= -I${GCCDIR}/config -I${GCCDIR}
23
24 GENHDRS=        runtime-info.h tconfig.h tm.h 
25 CLEANFILES+=    ${GENHDRS}
26 SRCS+=          ${GENHDRS}
27
28 ${OBJS}: ${GENHDRS}
29
30 runtime-info.h:
31         `${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \
32             < /dev/null > ${.TARGET}
33
34 tconfig.h:
35         echo '#include "gansidecl.h"'                           > ${.TARGET}
36         echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"'  >> ${.TARGET}
37
38 #       KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !!
39 tm.h:
40         echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"'     > ${.TARGET}
41 .if ${MACHINE_ARCH} == "i386"
42         echo '#include "${MACHINE_ARCH}/att.h"'                 >> ${.TARGET}
43 .endif
44         echo '#include <freebsd.h>'                             >> ${.TARGET}
45         echo '#include "${MACHINE_ARCH}/freebsd.h"'             >> ${.TARGET}
46 .if ${MACHINE_ARCH} == "i386"
47         echo '#include "${MACHINE_ARCH}/perform.h"'             >> ${.TARGET}
48 .endif
49
50 .include <bsd.lib.mk>