xref: /freebsd/contrib/elftoolchain/libelftc/Makefile (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
1# $Id: Makefile 3601 2018-04-12 16:58:53Z jkoshy $
2
3TOP=	..
4
5LIB=	elftc
6
7SRCS=	elftc_bfdtarget.c			\
8	elftc_copyfile.c			\
9	elftc_demangle.c			\
10	elftc_reloc_type_str.c			\
11	elftc_set_timestamps.c			\
12	elftc_string_table.c			\
13	elftc_timestamp.c			\
14	elftc_version.c				\
15	libelftc_bfdtarget.c			\
16	libelftc_dem_arm.c			\
17	libelftc_dem_gnu2.c			\
18	libelftc_dem_gnu3.c			\
19	libelftc_hash.c				\
20	libelftc_vstr.c
21
22INCS=		libelftc.h
23INCSDIR=	/usr/include
24
25RELEASE=	HEAD		# Change this on release branches.
26
27SHLIB_MAJOR=	1
28
29WARNS?=	6
30
31ELFTC_VERSION_FILE=	${.OBJDIR}/elftc_version.c
32CLEANFILES+=		${ELFTC_VERSION_FILE}
33
34LDADD+=	-lelf
35
36MAN=	elftc.3 \
37	elftc_bfd_find_target.3 \
38	elftc_copyfile.3 \
39	elftc_demangle.3 \
40	elftc_reloc_type_str.3 \
41	elftc_set_timestamps.3 \
42	elftc_string_table_create.3 \
43	elftc_version.3
44
45MLINKS=	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
46	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
47	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
48	elftc_string_table_create.3 elftc_string_table_from_section.3 \
49	elftc_string_table_create.3 elftc_string_table_destroy.3 \
50	elftc_string_table_create.3 elftc_string_table_image.3 \
51	elftc_string_table_create.3 elftc_string_table_insert.3 \
52	elftc_string_table_create.3 elftc_string_table_lookup.3
53
54.if	!make(clean) && !make(clobber) && !make(obj)
55.BEGIN:	.SILENT
56	${.CURDIR}/make-toolchain-version -t ${.CURDIR}/${TOP} \
57	    -r ${RELEASE} -h ${OS_HOST} -o ${ELFTC_VERSION_FILE}
58.endif
59
60.include "${TOP}/mk/elftoolchain.lib.mk"
61