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