freebsd-skq/gnu/lib/libobjc/Makefile
Peter Wemm 36716fe25b We *need* the pic libobjc library for amd64. It is needed for ia64 as
well, but I'll let Marcel decide whether he wants to build a .so or not.

Without this, building certain ports that use objc have fatal errors.
2004-09-29 23:42:44 +00:00

50 lines
1.3 KiB
Makefile

# $FreeBSD$
OBJCDIR=${.CURDIR}/../../../contrib/libobjc
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${OBJCDIR}/objc ${OBJCDIR}
LIB= objc
NOMAN= sorry
.if ${MACHINE_ARCH} == "amd64"
SHLIB_MAJOR= 1
.else
# XXX is this still correct?
NOPIC= works but method lookup slowdown is significant
.endif
SRCS= archive.c class.c encoding.c gc.c hash.c init.c misc.c \
nil_method.c objects.c sarray.c selector.c sendmsg.c \
thr.c thr-posix.c \
NXConstStr.m Object.m Protocol.m linking.m
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
# PR ia64/49081
.if ${MACHINE_ARCH} == "ia64"
CFLAGS+= -fpic
.endif
CFLAGS+= -fgnu-runtime -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}
GENHDRS= runtime-info.h tconfig.h tm.h
CLEANFILES+= ${GENHDRS}
SRCS+= ${GENHDRS}
${OBJS}: ${GENHDRS}
runtime-info.h:
`${CC} --print-prog-name=cc1obj` -print-objc-runtime-info \
< /dev/null > ${.TARGET}
tconfig.h tm.h : ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
.include <bsd.lib.mk>