diff options
author | bde <bde@FreeBSD.org> | 1998-05-15 09:30:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-05-15 09:30:13 +0000 |
commit | 680f5e79ae06d9d63ae284a61703de677b872dd1 (patch) | |
tree | 0e8fdd7d7baa5b9a09eb07ba8c76debb3b4254d7 /share/mk/bsd.prog.mk | |
parent | d464adb4c03446481b775185f820a5c71f68ed29 (diff) | |
download | FreeBSD-src-680f5e79ae06d9d63ae284a61703de677b872dd1.zip FreeBSD-src-680f5e79ae06d9d63ae284a61703de677b872dd1.tar.gz |
Support Objective C almost as well as C++.
Notes:
- We no longer use -fgnu-runtime in bsd.lib.mk, since it is the default
and bsd.lib.mk is the wrong place to override it.
- Gnu C doesn't have a special compiler driver for Objective C like it
does for C++. The defaults are suitable for Gnu C. Use `OBJCLIBS='
in /etc/make.conf for POC.
Diffstat (limited to 'share/mk/bsd.prog.mk')
-rw-r--r-- | share/mk/bsd.prog.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 12b380e..d6bf6af 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.71 1998/05/06 15:01:18 bde Exp $ +# $Id: bsd.prog.mk,v 1.72 1998/05/08 06:31:05 bde Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -8,7 +8,7 @@ # Default executable format BINFORMAT?= aout -.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S +.SUFFIXES: .out .o .c .cc .cxx .C .m .y .l .s .S CFLAGS+=${COPTS} ${DEBUG_FLAGS} .if defined(DESTDIR) @@ -27,6 +27,12 @@ LDFLAGS+= -static .if defined(PROG) .if defined(SRCS) +# If there are Objective C sources, link with Objective C libraries. +.if ${SRCS:M*.m} != "" +OBJCLIBS?= -lobjc +LDADD+= ${OBJCLIBS} +.endif + OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ${PROG}: ${OBJS} |