xref: /illumos-gate/usr/src/cmd/sgs/elfedit/modules/Makefile.targ (revision 69b1fd3f24d0ee2e682883606201c61f52085805)
1d29b2c44Sab196087#
2d29b2c44Sab196087# CDDL HEADER START
3d29b2c44Sab196087#
4d29b2c44Sab196087# The contents of this file are subject to the terms of the
5d29b2c44Sab196087# Common Development and Distribution License (the "License").
6d29b2c44Sab196087# You may not use this file except in compliance with the License.
7d29b2c44Sab196087#
8d29b2c44Sab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9d29b2c44Sab196087# or http://www.opensolaris.org/os/licensing.
10d29b2c44Sab196087# See the License for the specific language governing permissions
11d29b2c44Sab196087# and limitations under the License.
12d29b2c44Sab196087#
13d29b2c44Sab196087# When distributing Covered Code, include this CDDL HEADER in each
14d29b2c44Sab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15d29b2c44Sab196087# If applicable, add the following below this CDDL HEADER, with the
16d29b2c44Sab196087# fields enclosed by brackets "[]" replaced with your own identifying
17d29b2c44Sab196087# information: Portions Copyright [yyyy] [name of copyright owner]
18d29b2c44Sab196087#
19d29b2c44Sab196087# CDDL HEADER END
20d29b2c44Sab196087#
21d29b2c44Sab196087#
221dd08564Sab196087# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23d29b2c44Sab196087# Use is subject to license terms.
24d29b2c44Sab196087#
25*cf9a187cSAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
26d29b2c44Sab196087#
27d29b2c44Sab196087
28d29b2c44Sab196087
29d29b2c44Sab196087$(PICDIR)/%.o:	%.c
30d29b2c44Sab196087		$(COMPILE.c) $< -o $@
31d29b2c44Sab196087		$(POST_PROCESS_O)
32d29b2c44Sab196087
33d29b2c44Sab196087$(PICDIR)/%.o:	../common/%.c
34d29b2c44Sab196087		$(COMPILE.c) $< -o $@
35d29b2c44Sab196087		$(POST_PROCESS_O)
36d29b2c44Sab196087
37d29b2c44Sab196087$(PICDIR)/%32.o:	../common/%.c
38d29b2c44Sab196087		$(COMPILE.c) $< -o $@
39d29b2c44Sab196087		$(POST_PROCESS_O)
40d29b2c44Sab196087
41d29b2c44Sab196087$(PICDIR)/%64.o:	../common/%.c
42d29b2c44Sab196087		$(COMPILE.c) -D_ELF64 $< -o $@
43d29b2c44Sab196087		$(POST_PROCESS_O)
44d29b2c44Sab196087
45d29b2c44Sab196087
46d29b2c44Sab196087$(CAP_LIB): $(CAP_PICS)
47d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
48d29b2c44Sab196087		$(POST_PROCESS_SO)
49d29b2c44Sab196087
50d29b2c44Sab196087$(DYN_LIB): $(DYN_PICS)
51d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
52d29b2c44Sab196087		$(POST_PROCESS_SO)
53d29b2c44Sab196087
54d29b2c44Sab196087$(EHDR_LIB): $(EHDR_PICS)
55d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
56d29b2c44Sab196087		$(POST_PROCESS_SO)
57d29b2c44Sab196087
58d29b2c44Sab196087$(PHDR_LIB): $(PHDR_PICS)
59d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
60d29b2c44Sab196087		$(POST_PROCESS_SO)
61d29b2c44Sab196087
62d29b2c44Sab196087$(SHDR_LIB): $(SHDR_PICS)
63d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
64d29b2c44Sab196087		$(POST_PROCESS_SO)
65d29b2c44Sab196087
66ad212f6fSab196087$(STR_LIB): $(STR_PICS)
67ad212f6fSab196087		$(BUILD.SO) $(LLDFLAGS)
68ad212f6fSab196087		$(POST_PROCESS_SO)
69ad212f6fSab196087
70d29b2c44Sab196087$(SYM_LIB): $(SYM_PICS)
71d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
72d29b2c44Sab196087		$(POST_PROCESS_SO)
73d29b2c44Sab196087
74d29b2c44Sab196087$(SYMINFO_LIB): $(SYMINFO_PICS)
75d29b2c44Sab196087		$(BUILD.SO) $(LLDFLAGS)
76d29b2c44Sab196087		$(POST_PROCESS_SO)
77d29b2c44Sab196087
78d29b2c44Sab196087
79d29b2c44Sab196087$(ROOTELFEDITDIR):
80d29b2c44Sab196087		$(INS.dir)
81d29b2c44Sab196087
82d29b2c44Sab196087$(ROOTELFEDITDIR64):
83d29b2c44Sab196087		$(INS.dir)
84d29b2c44Sab196087
85d29b2c44Sab196087
86d29b2c44Sab196087$(ROOTELFEDITDIR)/%: %
87d29b2c44Sab196087		$(INS.file)
88d29b2c44Sab196087
89d29b2c44Sab196087$(ROOTELFEDITDIR64)/%: %
90d29b2c44Sab196087		$(INS.file)
91d29b2c44Sab196087
92d29b2c44Sab196087
93d29b2c44Sab196087../common/%.c:	%_msg.h
94d29b2c44Sab196087
95d29b2c44Sab196087%_msg.h %_msg.c:	$(SGSMSG) ../common/%.msg
96d29b2c44Sab196087		$(SGSMSG) $(SGSMSGFLAGS) -l -h $@ -d $@ \
97d29b2c44Sab196087			-m $(SGSMSGDIR)/elfedit_$* -n $*_msg $<
98d29b2c44Sab196087
99d29b2c44Sab196087# This rule causes the message catalog file to be created under
100d29b2c44Sab196087# sgs/messages, but does not regenerate the C or header file for the module.
101d29b2c44Sab196087$(SGSMSGDIR)/elfedit_%: $(SGSMSG) ../common/%.msg
102d29b2c44Sab196087		$(SGSMSG) $(SGSMSGFLAGS) -l -m $(SGSMSGDIR)/elfedit_$* $<
103d29b2c44Sab196087
104d29b2c44Sab196087catalog:	$(SGSMSGDIR)/elfedit_cap \
105d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_dyn \
106d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_ehdr \
107d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_phdr \
108d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_shdr \
109ad212f6fSab196087		$(SGSMSGDIR)/elfedit_str \
110d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_sym \
111d29b2c44Sab196087		$(SGSMSGDIR)/elfedit_syminfo
112d29b2c44Sab196087
113d29b2c44Sab196087chkmsg:		$(SRCS)
114d29b2c44Sab196087		sh $(CHKMSG) -m ../common/cap.msg ../common/cap.c
115d29b2c44Sab196087		sh $(CHKMSG) -m ../common/dyn.msg ../common/dyn.c
116d29b2c44Sab196087		sh $(CHKMSG) -m ../common/ehdr.msg ../common/ehdr.c
117d29b2c44Sab196087		sh $(CHKMSG) -m ../common/phdr.msg ../common/phdr.c
118d29b2c44Sab196087		sh $(CHKMSG) -m ../common/shdr.msg ../common/shdr.c
119ad212f6fSab196087		sh $(CHKMSG) -m ../common/str.msg ../common/str.c
120d29b2c44Sab196087		sh $(CHKMSG) -m ../common/sym.msg ../common/sym.c
121d29b2c44Sab196087		sh $(CHKMSG) -m ../common/syminfo.msg ../common/syminfo.c
122d29b2c44Sab196087
1231dd08564Sab196087
124d29b2c44Sab196087include		$(SRC)/lib/Makefile.targ
125