summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cxxfilt/Makefile
blob: 9ce23b8575229911938f3acd60c28c4c715c33e1 (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
NOMAN=1
PROG=c++filt

SRCS=	cxxfilt.c
LIBIBERTY_INCDIR=${.CURDIR}/../../lib/libiberty/include

CFLAGS+=-I${LIBIBERTY_INCDIR}
LDADD=-liberty

underscore.c:
	@case ${ELF_TOOLCHAIN:L} in \
	    "yes") v=0;; \
	    *) v=1;; \
	esac; \
	c="int prepends_underscore=$$v;"; \
	echo "echo \"$$c\" >$@"; \
	echo $$c >$@

cxxmain.c:
	ln -s ${LIBIBERTY_SRCDIR}/cplus-dem.c $@

.include <bsd.prog.mk>

.if ${ELF_TOOLCHAIN:L} == "yes"
CFLAGS+=-DTARGET_PREPENDS_UNDERSCORE=0
.else
CFLAGS+=-DTARGET_PREPENDS_UNDERSCORE=1
.endif