Add lib/gcc3/csu
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 21 Jan 2004 20:21:58 +0000 (20:21 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 21 Jan 2004 20:21:58 +0000 (20:21 +0000)
gnu/lib/gcc3/Makefile [new file with mode: 0644]
gnu/lib/gcc3/Makefile.inc [new file with mode: 0644]
gnu/lib/gcc3/csu/Makefile [new file with mode: 0644]

diff --git a/gnu/lib/gcc3/Makefile b/gnu/lib/gcc3/Makefile
new file mode 100644 (file)
index 0000000..224b216
--- /dev/null
@@ -0,0 +1,5 @@
+# $DragonFly: src/gnu/lib/gcc3/Attic/Makefile,v 1.1 2004/01/21 20:21:58 joerg Exp $
+
+SUBDIR= csu
+
+.include <bsd.subdir.mk>
diff --git a/gnu/lib/gcc3/Makefile.inc b/gnu/lib/gcc3/Makefile.inc
new file mode 100644 (file)
index 0000000..dadfc52
--- /dev/null
@@ -0,0 +1,5 @@
+# $DragonFly: src/gnu/lib/gcc3/Attic/Makefile.inc,v 1.1 2004/01/21 20:21:58 joerg Exp $
+#
+
+USEGNUDIR=YES
+GCCVER=3
diff --git a/gnu/lib/gcc3/csu/Makefile b/gnu/lib/gcc3/csu/Makefile
new file mode 100644 (file)
index 0000000..d424967
--- /dev/null
@@ -0,0 +1,57 @@
+# $DragonFly: src/gnu/lib/gcc3/csu/Attic/Makefile,v 1.1 2004/01/21 20:21:58 joerg Exp $
+
+GCCDIR=        ${.CURDIR}/../../../../contrib/gcc3
+CCTOOLS_SRC = ${.CURDIR}/../../../usr.bin/cc3/cc_tools
+CCTOOLS_OBJ = ${.OBJDIR}/../../../usr.bin/cc3/cc_tools
+
+.PATH: ${GCCDIR}
+SRCS=          crtstuff.c
+
+OBJS=          crtbegin.o crtend.o
+SOBJS=         crtbegin.So crtend.So
+CFLAGS+=       -I${GCCDIR} -I${GCCDIR}/config -I${CCTOOLS_SRC} \
+               -I${CCTOOLS_OBJ} -DIN_GCC \
+               -finhibit-size-directive -fno-inline-functions \
+               -fno-exceptions -fno-omit-frame-pointer \
+               -fno-zero-initialized-in-bss
+
+CRTS_CFLAGS=   -DCRTSTUFFS_O ${PICFLAG}
+
+all: ${OBJS} ${SOBJS}
+
+CLEANFILES+=   ${OBJS} ${SOBJS}
+
+.if exists(${CCTOOLS_OBJ})
+TCONFIG_H = ${CCTOOLS_OBJ}/tconfig.h
+.else
+TCONFIG_H = ${CCTOOLS_SRC}/tconfig.h
+.endif
+
+crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} ${TCONFIG_H}
+
+crtbegin.o:
+       ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
+               -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
+
+crtbegin.So:
+       ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
+               -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
+
+crtend.o:
+       ${CC} ${CFLAGS} -g0 -DCRT_END \
+               -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
+
+crtend.So:
+       ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
+               -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
+
+TCONFIG_H:
+       cd ${CCTOOLS_SRC} && make tconfig.h
+
+realinstall:
+.for file in ${OBJS} ${SOBJS}
+       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+           ${file} ${DESTDIR}${GCCLIBDIR}/${file:S/.So$/S.o/}
+.endfor
+
+.include <bsd.lib.mk>