diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.dep.mk | 8 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 22 | ||||
-rw-r--r-- | share/mk/bsd.libnames.mk | 3 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 10 | ||||
-rw-r--r-- | share/mk/sys.mk | 10 |
5 files changed, 38 insertions, 15 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 12a51e0..4914a39 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -1,4 +1,4 @@ -# $Id: bsd.dep.mk,v 1.21 1998/05/08 06:31:05 bde Exp $ +# $Id: bsd.dep.mk,v 1.22 1998/05/11 15:37:13 bde Exp $ # # The include file <bsd.dep.mk> handles Makefile dependencies. # @@ -94,6 +94,12 @@ ${DEPENDFILE}: ${SRCS} ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BID]*} \ ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx} .endif +.if ${SRCS:M*.m} != "" + ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \ + ${OBJCFLAGS:M-nostdinc*} ${OBJCFLAGS:M-[BID]*} \ + ${OBJCFLAGS:M-Wno-import*} \ + ${.ALLSRC:M*.m} +.endif .if target(_EXTRADEPEND) cd ${.CURDIR}; ${MAKE} _EXTRADEPEND .endif diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 2a3118c..ee90118 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 -# $Id: bsd.lib.mk,v 1.69 1998/03/07 13:13:41 bde Exp $ +# $Id: bsd.lib.mk,v 1.70 1998/03/12 20:02:13 eivind Exp $ # .if exists(${.CURDIR}/../Makefile.inc) @@ -84,6 +84,18 @@ STRIP?= -s ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} @${LD} -O ${.TARGET} -x -r ${.TARGET} +.m.o: + ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} + @${LD} -O ${.TARGET} -x -r ${.TARGET} + +.m.po: + ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} + @${LD} -O ${.TARGET} -X -r ${.TARGET} + +.m.so: + ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} + @${LD} -O ${.TARGET} -x -r ${.TARGET} + .s.o: ${CC} -x assembler-with-cpp ${CFLAGS:M-[BID]*} ${AINC} -c \ ${.IMPSRC} -o ${.TARGET} @@ -111,14 +123,6 @@ STRIP?= -s ${CC} -fpic -DPIC ${CFLAGS:M-[BID]*} ${AINC} -c ${.IMPSRC} -o ${.TARGET} @${LD} -O ${.TARGET} -x -r ${.TARGET} -.m.o: - ${CC} ${CFLAGS} -fgnu-runtime -c ${.IMPSRC} -o ${.TARGET} - @${LD} -O ${.TARGET} -x -r ${.TARGET} - -.m.po: - ${CC} ${CFLAGS} -fgnu-runtime -pg -c ${.IMPSRC} -o ${.TARGET} - @${LD} -O ${.TARGET} -X -r ${.TARGET} - .if !defined(INTERNALLIB) || defined(INTERNALSTATICLIB) .if !defined(NOPROFILE) && !defined(INTERNALLIB) _LIBS=lib${LIB}.a lib${LIB}_p.a diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 47e4928..bc3f75d 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -1,4 +1,4 @@ -# $Id: bsd.libnames.mk,v 1.9 1997/12/09 20:17:49 wosch Exp $ +# $Id: bsd.libnames.mk,v 1.10 1997/12/15 20:30:38 helbig Exp $ # # The include file <bsd.libnames.mk> define library names. # Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this @@ -42,6 +42,7 @@ LIBMD?= ${DESTDIR}/usr/lib/libmd.a LIBMP?= ${DESTDIR}/usr/lib/libmp.a LIBMYTINFO?= ${DESTDIR}/usr/lib/libmytinfo.a LIBNCURSES?= ${DESTDIR}/usr/lib/libncurses.a +LIBOBJC?= ${DESTDIR}/usr/lib/libobjc.a LIBOPIE?= ${DESTDIR}/usr/lib/libopie.a LIBPC?= ${DESTDIR}/usr/lib/libpc.a # XXX doesn't exist LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a 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} diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 50680df..c6a3896 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,5 +1,5 @@ # from: @(#)sys.mk 8.2 (Berkeley) 3/21/94 -# $Id: sys.mk,v 1.30 1998/03/23 14:58:30 eivind Exp $ +# $Id: sys.mk,v 1.31 1998/05/01 11:36:59 jkh Exp $ unix ?= We run FreeBSD, not UNIX. @@ -15,7 +15,7 @@ unix ?= We run FreeBSD, not UNIX. .if defined(%POSIX) .SUFFIXES: .o .c .y .l .a .sh .f .else -.SUFFIXES: .out .a .ln .o .c .cc .cxx .C .F .f .e .r .y .l .S .s .cl .p .h .sh +.SUFFIXES: .out .a .ln .o .c .cc .cxx .C .m .F .f .e .r .y .l .S .s .cl .p .h .sh .endif .LIBS: .a @@ -79,6 +79,9 @@ LINTFLAGS ?= -chapbx MAKE ?= make +OBJC ?= cc +OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import + PC ?= pc PFLAGS ?= @@ -185,6 +188,9 @@ HTAGSFLAGS= .cc.o .cxx.o .C.o: ${CXX} ${CXXFLAGS} -c ${.IMPSRC} +.m.o: + ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} + .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} |