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