2001-07-24 23:44:47 +04:00
|
|
|
# $NetBSD: Makefile,v 1.12 2001/07/24 19:44:49 tv Exp $
|
2001-01-09 11:33:46 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1998-08-29 02:36:56 +04:00
|
|
|
|
2001-07-24 23:44:47 +04:00
|
|
|
LIB= objc
|
|
|
|
MKLINT= no
|
|
|
|
|
|
|
|
.if defined(USE_NEW_TOOLCHAIN)
|
|
|
|
|
|
|
|
# Machine-independent definitions (include file names).
|
|
|
|
.include "${.CURDIR}/defs.mk"
|
|
|
|
|
|
|
|
# Machine-dependent definitions (object files, -Ds).
|
|
|
|
.include "${.CURDIR}/${MACHINE_ARCH}.mk"
|
|
|
|
|
|
|
|
TOP= ${.CURDIR}/../..
|
|
|
|
DIST= ${TOP}/dist/toolchain
|
|
|
|
GCCARCH= ${TOP}/usr.bin/gcc/arch/${MACHINE_ARCH}
|
|
|
|
|
|
|
|
SRCS= ${G_OBJS:N[A-Z]*:Nlinking.o:.o=.c} ${G_OBJS:M[A-Z]*:.o=.m} linking.m
|
|
|
|
|
|
|
|
GCPPFLAGS= ${G_ALL_CFLAGS} ${G_INCLUDES}
|
|
|
|
CPPFLAGS+= -I. -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
|
|
|
|
|
|
|
|
INCS= ${G_OBJC_H}
|
|
|
|
INCSDIR= /usr/include/objc
|
|
|
|
|
|
|
|
DPSRCS+= runtime-info.h
|
|
|
|
CLEANFILES+= rtscratch rtscratch.s
|
|
|
|
runtime-info.h:
|
|
|
|
@touch rtscratch
|
|
|
|
`${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch >$@
|
|
|
|
|
|
|
|
.PATH: ${DIST}/libobjc ${DIST}/libobjc/objc
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
|
|
|
${OBJS}: ${.CURDIR}/${MACHINE_ARCH}.mk runtime-info.h
|
|
|
|
|
|
|
|
.else
|
|
|
|
#
|
|
|
|
# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
|
|
|
|
#
|
1998-08-29 02:36:56 +04:00
|
|
|
HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
|
|
|
|
|
|
|
|
.if (${HAVE_GCC28} != "")
|
1998-08-18 18:02:35 +04:00
|
|
|
|
2001-07-24 23:44:47 +04:00
|
|
|
MKPIC=no # XXX hack; shlib_version mismatch
|
|
|
|
|
1998-08-18 18:02:35 +04:00
|
|
|
SRCS= hash.c sarray.c class.c sendmsg.c init.c archive.c \
|
|
|
|
encoding.c selector.c objects.c misc.c NXConstStr.m \
|
|
|
|
Object.m Protocol.m nil_method.c thr.c linking.m \
|
|
|
|
thr-single.c
|
|
|
|
DPSRCS+= runtime-info.h
|
|
|
|
|
1998-08-28 01:37:52 +04:00
|
|
|
INCS= hash.h objc-list.h sarray.h objc.h objc-api.h NXConstStr.h \
|
|
|
|
Object.h Protocol.h encoding.h typedstream.h thr.h
|
|
|
|
INCSDIR= /usr/include/objc
|
2001-01-09 11:33:46 +03:00
|
|
|
DIST= ${.CURDIR}/../../dist/gcc
|
|
|
|
ARCH= ${.CURDIR}/../../usr.bin/egcs/arch
|
1998-08-28 01:37:52 +04:00
|
|
|
|
2001-01-08 11:29:59 +03:00
|
|
|
.if exists(${ARCH}/${MACHINE_ARCH})
|
1999-02-24 20:18:26 +03:00
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH}
|
2001-01-08 11:29:59 +03:00
|
|
|
.elif exists(${ARCH}/${MACHINE_CPU})
|
|
|
|
ARCHSUBDIR= ${MACHINE_CPU}
|
|
|
|
.else
|
|
|
|
.BEGIN:
|
|
|
|
@echo no egcs/arch/${MACHINE_ARCH} nor egcs/arch/${MACHINE_CPU} exists
|
|
|
|
@false
|
1999-02-24 20:18:26 +03:00
|
|
|
.endif
|
|
|
|
|
|
|
|
CPPFLAGS+= -I. -I${ARCH}/${ARCHSUBDIR} -I${ARCH} \
|
1998-08-18 18:02:35 +04:00
|
|
|
-I${DIST}/config -I${DIST}
|
|
|
|
|
|
|
|
CLEANFILES+= rtscratch rtscratch.s
|
|
|
|
runtime-info.h:
|
|
|
|
@touch rtscratch
|
1998-08-18 21:38:38 +04:00
|
|
|
`${OBJC} --print-prog-name=cc1obj` -print-objc-runtime-info rtscratch >$@
|
1998-08-18 18:02:35 +04:00
|
|
|
|
1998-08-18 21:38:38 +04:00
|
|
|
sendmsg.o sendmsg.so sendmsg.po: runtime-info.h
|
1998-08-18 18:02:35 +04:00
|
|
|
|
|
|
|
.PATH: ${DIST}/objc
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
1998-08-29 02:36:56 +04:00
|
|
|
|
|
|
|
.else
|
|
|
|
|
|
|
|
# XXX Temporary: during an egcs bootstrap, don't try to build with gcc 2.7
|
|
|
|
${TARGETS}:
|
|
|
|
|
|
|
|
.endif
|
2001-07-24 23:44:47 +04:00
|
|
|
#
|
|
|
|
# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
|
|
|
|
#
|
|
|
|
.endif
|