diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-01-15 23:45:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-01-15 23:45:38 +0000 |
commit | f648ba1716bad7d62f9b30aa8287d797dfaebf8a (patch) | |
tree | 6e4148cdb9e4025f4b173b4b266a77dfe08b6013 /gnu/lib | |
parent | 78d6321c5785c393e82e1250642e8cb92a539066 (diff) |
OpenBSD specific infrastructure
Diffstat (limited to 'gnu/lib')
-rw-r--r-- | gnu/lib/libobjc/Makefile.bsd-wrapper | 156 | ||||
-rw-r--r-- | gnu/lib/libobjc/shlib_version | 2 |
2 files changed, 158 insertions, 0 deletions
diff --git a/gnu/lib/libobjc/Makefile.bsd-wrapper b/gnu/lib/libobjc/Makefile.bsd-wrapper new file mode 100644 index 00000000000..d4f65217804 --- /dev/null +++ b/gnu/lib/libobjc/Makefile.bsd-wrapper @@ -0,0 +1,156 @@ +# $OpenBSD: Makefile.bsd-wrapper,v 1.1 2004/01/15 23:45:37 espie Exp $ + +LIB= objc + + +LIBIBERTY_INCLUDES=${.CURDIR}/../libiberty/include +.include <bsd.own.mk> +.if ${USE_GCC3:L} == "yes" +GCCDIR= $(.CURDIR)/../../usr.bin/gcc +GCCSRCDIR=${GCCDIR}/gcc +.else +GCCDIR= $(.CURDIR)/../../egcs/gcc +GCCSRCDIR=${GCCDIR} +.endif + +.if defined(OBJMACHINE) +OBJDIR= obj.${MACHINE} +.else +OBJDIR= obj +.endif +GCCOBJDIR!= if [ -d $(GCCDIR)/$(OBJDIR) ]; then \ + echo $(GCCDIR)/$(OBJDIR); \ + else \ + echo $(GCCDIR); \ + fi + +GNUCFLAGS= ${CFLAGS} ${COPTS} -DOPENBSD_NATIVE + + +MAKE_FLAGS= CFLAGS="${GNUCFLAGS}" \ + CC="${CC}" LDFLAGS="${LDSTATIC}" \ + LIBIBERTY_INCLUDES=${LIBIBERTY_INCLUDES} \ + CPPFLAGS=${CPPFLAGS} \ + GCCSRCDIR=${GCCSRCDIR} \ + GCCOBJDIR=${GCCOBJDIR} + +CPPFLAGS+= -I. -I${.CURDIR}/libobjc -I$(.CURDIR)/libobjc/objc -I$(GCCSRCDIR) \ +-I$(GCCSRCDIR)/config -I$(GCCOBJDIR) -I$(LIBIBERTY_INCLUDES) \ +-DIN_GCC + +SRCS=archive.c class.c encoding.c gc.c hash.c init.c linking.m misc.c \ +nil_method.c NXConstStr.m Object.m objects.c Protocol.m sarray.c \ +selector.c sendmsg.c thr.c + +# XXX need to check how threads work. +SRCS+=thr-single.c + +includes: + install -d -m 755 -o $(BINOWN) -g $(BINGRP) \ + $(DESTDIR)/usr/include/objc + @-cd $(.CURDIR)/libobjc/objc; for i in *.h; do \ + [ $$i = "runtime.h" ] || install -C -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \ + $$i $(DESTDIR)/usr/include/objc/$$i; \ + done + +depend: + cd ${GCCDIR} && exec ${MAKE} -f Makefile.bsd-wrapper config.status target_path tconfig.h + +sendmsg.o sendmsg.go sendmsg.po sendmsg.so: runtime-info.h + +runtime-info.h: + echo "" > tmp-runtime + echo "/* This file is automatically generated */" > $@ + `$(CC) -print-prog-name=cc1obj` -print-objc-runtime-info tmp-runtime >> $@ + rm -f tmp-runtime + +.ifdef GLOBAL_AUTOCONF_CACHE +CF= --cache-file=${GLOBAL_AUTOCONF_CACHE} +.else +CF= +.endif + +config.status: libobjc/Makefile.in libobjc/configure + PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ + INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ + GCCDIR=${GCCDIR} \ + /bin/sh ${.CURDIR}/libobjc/configure --with-gnu-as --with-gnu-ld \ + --prefix=/usr --mandir='$$(prefix)/share/man' \ + --enable-shared \ + --with-local-prefix=/usr ${CF} \ + && touch config.status + +.ifdef NOMAN +maninstall: + @echo NOMAN is set +.endif + +depend: + +lint: + # Nothing here so far... + +tags: + # Nothing here so far... + +.include <bsd.obj.mk> +.ifndef NOMAN +.include <bsd.man.mk> +.endif +.include <bsd.lib.mk> + +.SUFFIXES: .m + +.PATH.c: ${.CURDIR}/libobjc +.PATH.m: ${.CURDIR}/libobjc + +COMPILE.m=${COMPILE.c} -fgnu-runtime + +gc.o: gc.c + @echo "${COMPILE.m} ${.ALLSRC} -o ${.TARGET}" + @${COMPILE.m} ${.ALLSRC} -o ${.TARGET}.o + @${LD} -x -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +gc.go: gc.c + @echo "${COMPILE.m} -g ${.ALLSRC} -o ${.TARGET}" + @${COMPILE.m} -g ${.ALLSRC} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +gc.po: gc.c + @echo "${COMPILE.m} -p ${.ALLSRC} -o ${.TARGET}" + @${COMPILE.m} -p ${.ALLSRC} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +gc.so: gc.c + @echo "${COMPILE.m} ${PICFLAG} -DPIC ${.ALLSRC} -o ${.TARGET}" + @${COMPILE.m} ${PICFLAG} -DPIC ${.ALLSRC} -o ${.TARGET}.o + @${LD} -x -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +.m.o: + @echo "${COMPILE.m} ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o + @${LD} -x -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +.m.go: + @echo "${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +.m.po: + @echo "${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}.o + @${LD} -X -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + +.m.so: + @echo "${COMPILE.m} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.m} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}.o + @${LD} -x -r ${.TARGET}.o -o ${.TARGET} + @rm -f ${.TARGET}.o + diff --git a/gnu/lib/libobjc/shlib_version b/gnu/lib/libobjc/shlib_version new file mode 100644 index 00000000000..1edea46de91 --- /dev/null +++ b/gnu/lib/libobjc/shlib_version @@ -0,0 +1,2 @@ +major=1 +minor=0 |