RIP GNU patch.
[dragonfly.git] / gnu / lib / gcc3 / csu / Makefile
CommitLineData
7db62ea6 1# $DragonFly: src/gnu/lib/gcc3/csu/Attic/Makefile,v 1.4 2004/02/02 23:35:09 dillon Exp $
48038f09 2
7db62ea6 3.include "../Makefile.inc"
48038f09 4
7db62ea6 5.PATH: ${GCCDIR}/gcc
48038f09
JS
6SRCS= crtstuff.c
7
8OBJS= crtbegin.o crtend.o
9SOBJS= crtbegin.So crtend.So
7db62ea6
MD
10
11CFLAGS+= -I${GCCDIR}/gcc -I${GCCDIR}/gcc/config \
12 -I${GCCDIR}/include -I${CCTOOLS_SRC} -I${DFLYH} \
13 -I${GCCIR}/gcc/config \
14 -I${CCTOOLS_OBJ}
15
16CFLAGS+= -DIN_GCC \
48038f09
JS
17 -finhibit-size-directive -fno-inline-functions \
18 -fno-exceptions -fno-omit-frame-pointer \
19 -fno-zero-initialized-in-bss
20
21CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
22
7db62ea6
MD
23# crtbegin.c needs either CRT_BEGIN or CRT_END defined, and we can't
24# set a default in CFLAGS because we need to switch down below.
25#
26MKDEPCMD= CC="${CC}" MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep
27
48038f09
JS
28all: ${OBJS} ${SOBJS}
29
30CLEANFILES+= ${OBJS} ${SOBJS}
31
32.if exists(${CCTOOLS_OBJ})
33TCONFIG_H = ${CCTOOLS_OBJ}/tconfig.h
34.else
35TCONFIG_H = ${CCTOOLS_SRC}/tconfig.h
36.endif
37
38crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} ${TCONFIG_H}
39
40crtbegin.o:
41 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
42 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
43
44crtbegin.So:
45 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
46 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
47
48crtend.o:
49 ${CC} ${CFLAGS} -g0 -DCRT_END \
50 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
51
52crtend.So:
53 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
54 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
55
6aa2dd31 56${TCONFIG_H}: ${CCTOOLS_SRC}/Makefile
48038f09
JS
57 cd ${CCTOOLS_SRC} && make tconfig.h
58
6aa2dd31
JS
59beforedepend: ${TCONFIG_H}
60
48038f09
JS
61realinstall:
62.for file in ${OBJS} ${SOBJS}
63 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
64 ${file} ${DESTDIR}${GCCLIBDIR}/${file:S/.So$/S.o/}
65.endfor
66
67.include <bsd.lib.mk>