xref: /dragonfly/gnu/lib/gcc47/libobjc/Makefile (revision ec21d9fb)
1CFLAGS+=	-I${.CURDIR}
2CFLAGS+=	-I${.OBJDIR}
3.include "../Makefile.inc"
4
5.PATH: ${GCCDIR}/libobjc
6.PATH: ${GCCDIR}/libobjc/objc
7.PATH: ${GCCDIR}/gcc
8.PATH: ${GCCDIR}/gcc/cp
9.PATH: ${GCCDIR}/gcc/objc
10.PATH: ${GCCDIR}/libgcc
11
12CFLAGS+=	-I${GCCDIR}/libcpp/include
13CFLAGS+=	-I${GCCDIR}/libgcc
14CFLAGS+=	-DIN_GCC
15CFLAGS+=	-DIN_TARGET_LIBS
16CFLAGS+=	-DHAVE_CONFIG_H
17CFLAGS+=	-fexceptions
18CFLAGS+=	-fno-strict-aliasing
19
20LIB=		objc
21SHLIB_MAJOR=	4
22
23THRLIB= 	${.OBJDIR}/../../../../lib/libpthread/libpthread.so
24LDADD+= 	${THRLIB}
25DPADD+= 	${THRLIB}
26
27# Objective-C source files to compile
28OBJC_SOURCE_FILES = \
29   NXConstStr.m \
30   Object.m \
31   Protocol.m \
32   accessors.m \
33   linking.m
34
35# C source files to compile
36C_SOURCE_FILES = \
37   class.c \
38   encoding.c \
39   error.c \
40   gc.c \
41   hash.c \
42   init.c \
43   ivars.c \
44   memory.c \
45   methods.c \
46   nil_method.c \
47   objc-foreach.c \
48   objc-sync.c \
49   objects.c \
50   protocols.c \
51   sarray.c \
52   selector.c \
53   sendmsg.c \
54   thr.c \
55   exception.c
56
57SRCS=   ${C_SOURCE_FILES}
58SRCS+=  ${OBJC_SOURCE_FILES}
59SRCS+=	unwind.h runtime-info.h gthr-default.h
60
61unwind.h: unwind-generic.h
62	cp ${.ALLSRC} ${.TARGET}
63
64gthr-default.h: gthr-posix.h
65	cp ${.ALLSRC} ${.TARGET}
66
67runtime-info.h:
68	echo "" > tmp-runtime.m
69	echo "/* This file is automatically generated */" > ${.TARGET}
70	${CC} -print-objc-runtime-info -S tmp-runtime.m >> ${.TARGET}
71	rm -f tmp-runtime.m tmp-runtime.s
72
73INCS=		NXConstStr.h \
74		Object.h \
75		Protocol.h \
76		message.h \
77		objc-decls.h \
78		objc-exception.h \
79		objc-sync.h \
80		objc.h \
81		runtime.h \
82		thr.h
83INCSDIR=	/usr/libdata/gcc${GCCSHORTVER}/objc
84
85CLEANFILES+=	unwind.h runtime-info.h gthr-default.h
86
87.include <bsd.lib.mk>
88