summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/Makefile.bsd-wrapper
blob: 79f73d6f9cece72eb5c7af4358b72649826f75d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#	$OpenBSD: Makefile.bsd-wrapper,v 1.28 1998/10/18 20:02:29 millert Exp $

SUBDIRS=	libiberty opcodes bfd
MAN=

# gdb not ready yet
.if (${MACHINE_ARCH} != "unknown")
SUBDIRS+=	gdb mmalloc readline 
MAN+=		gdb/gdb.1 
.endif

# some ports use all of binutils, some do not.
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "mips") || \
	(${MACHINE_ARCH} == "powerpc")
SUBDIRS+=	binutils ld gas
MAN+=		binutils/ar.1 binutils/nm.1 \
		binutils/objcopy.1 binutils/objdump.1 binutils/ranlib.1 \
		binutils/size.1 binutils/strings.1 binutils/strip.1 \
		gas/doc/as.1 gprof/gprof.1 ld/ld.1
.endif

.if (${MACHINE_ARCH} == "mips") || (${MACHINE_ARCH} == "powerpc") || (${MACHINE_ARCH} == "alpha")
SUBDIRS+=	gprof
.endif

# Used by the GNU Makefile
ALL_MODULES=${SUBDIRS:S/^/all-/g}
INSTALL_MODULES=${SUBDIRS:S/^/install-/g}
	
all:	config.status
	${MAKE} CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS=${LDSTATIC} \
		SUBDIRS="${SUBDIRS}" ALL_MODULES="${ALL_MODULES}" \
		INSTALL_MODULES="${INSTALL_MODULES}"

.FORCE:	.IGNORE

.include <bsd.own.mk>

.ifdef GLOBAL_AUTOCONF_CACHE
CF=	--cache-file=${GLOBAL_AUTOCONF_CACHE}
.else
CF=
.endif

config: .FORCE
.ifndef GLOBAL_AUTOCONF_CACHE
	-rm -f config.cache
.endif
	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
	sh ${.CURDIR}/configure --prefix=/usr --infodir=/usr/share/info --disable-gdbtk ${CF}

config.status:
	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
	sh ${.CURDIR}/configure --prefix=/usr --infodir=/usr/share/info --disable-gdbtk ${CF}

.ifdef NOMAN
maninstall:
	@echo NOMAN is set
.endif

install: maninstall
	${MAKE} prefix=${DESTDIR}/usr infodir=${DESTDIR}/usr/share/info \
		bindir=${DESTDIR}/usr/bin INSTALL_MAN= SUBDIRS="${SUBDIRS}" \
		ALL_MODULES="${ALL_MODULES}" INSTALL_MODULES="${INSTALL_MODULES}" \
		install install-info

clean cleandir:
	-@if [ -e Makefile ]; then ${MAKE} distclean; fi

depend:
	# Nothing here so far...

lint:
	# Nothing here so far...

tags:
	# Nothing here so far...

.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.ifndef NOMAN
.include <bsd.man.mk>
.endif