xref: /illumos-gate/usr/src/tools/sgs/include/Makefile (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12# Copyright 2019, Richard Lowe.
13
14include ../../../Makefile.master
15
16#
17# To build a proper 'tools' version of the link-editor is not possible, as
18# we'll always depend on the ELF-related headers from the workspace, not the
19# system.
20#
21# We pull in the minimum amount of headers using an explicit list of "ELF-y"
22# headers to populate this directory, which we then search while building.
23#
24# This may not be enough on all occasions, judgement must be used to decide
25# between providing extra headers, and wrapping problematic code in conditions
26# on NATIVE_BUILD for a period of time.
27#
28
29ROOTHDRS=	dlfcn.h \
30		gelf.h \
31		libelf.h \
32		proc_service.h \
33		rtld_db.h \
34		link.h
35
36SYSHDRS=	sys/elf.h \
37		sys/elf_386.h \
38		sys/elf_SPARC.h \
39		sys/elf_notes.h \
40		sys/elf_amd64.h \
41		sys/elftypes.h \
42		sys/auxv.h \
43		sys/auxv_SPARC.h \
44		sys/auxv_386.h \
45		sys/avl.h \
46		sys/link.h \
47		sys/machelf.h \
48		sys/note.h \
49		sys/systeminfo.h
50
51sys:
52	$(MKDIR) -p sys
53
54%: $(SRC)/head/%
55	$(INS.file)
56
57sys/%: sys $(SRC)/uts/common/sys/%
58	$(INS.file)
59
60all install: $(SYSHDRS) $(ROOTHDRS)
61
62clean:
63
64clobber: clean
65	$(RM) $(SYSHDRS) $(ROOTHDRS)
66
67
68
69