xref: /titanic_44/usr/src/cmd/sgs/elfedit/modules/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
2108278a5eSRod Evans
22d29b2c44Sab196087#
2308278a5eSRod Evans# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24d29b2c44Sab196087# Use is subject to license terms.
25d29b2c44Sab196087#
26d29b2c44Sab196087
27d29b2c44Sab196087include		../../../../../lib/Makefile.lib
28d29b2c44Sab196087include		../../../Makefile.com
29d29b2c44Sab196087
30d29b2c44Sab196087CAP_LIB=	cap.so
31d29b2c44Sab196087CAP_OBJ=	cap_msg.o cap32.o cap64.o
32d29b2c44Sab196087
33d29b2c44Sab196087DYN_LIB=	dyn.so
34d29b2c44Sab196087DYN_OBJ=	dyn_msg.o dyn32.o dyn64.o
35d29b2c44Sab196087
36d29b2c44Sab196087EHDR_LIB=	ehdr.so
37d29b2c44Sab196087EHDR_OBJ=	ehdr_msg.o ehdr32.o ehdr64.o
38d29b2c44Sab196087
39d29b2c44Sab196087PHDR_LIB=	phdr.so
40d29b2c44Sab196087PHDR_OBJ=	phdr_msg.o phdr32.o phdr64.o
41d29b2c44Sab196087
42d29b2c44Sab196087SHDR_LIB=	shdr.so
43d29b2c44Sab196087SHDR_OBJ=	shdr_msg.o shdr32.o shdr64.o
44d29b2c44Sab196087
45ad212f6fSab196087STR_LIB=	str.so
46ad212f6fSab196087STR_OBJ=	str_msg.o str32.o str64.o
47ad212f6fSab196087
48d29b2c44Sab196087SYM_LIB=	sym.so
49d29b2c44Sab196087SYM_OBJ=	sym_msg.o sym32.o sym64.o
50d29b2c44Sab196087
51d29b2c44Sab196087SYMINFO_LIB=	syminfo.so
52d29b2c44Sab196087SYMINFO_OBJ=	syminfo_msg.o syminfo32.o syminfo64.o
53d29b2c44Sab196087
54d29b2c44Sab196087ELFEDITLIBS=	$(CAP_LIB) $(DYN_LIB) $(EHDR_LIB) $(PHDR_LIB) \
55ad212f6fSab196087		$(SHDR_LIB) $(STR_LIB) $(SYM_LIB) $(SYMINFO_LIB)
56d29b2c44Sab196087
57d29b2c44Sab196087PICDIR=		pics
58d29b2c44Sab196087
59d29b2c44Sab196087CAP_PICS=	$(CAP_OBJ:%.o=$(PICDIR)/%.o)
60d29b2c44Sab196087DYN_PICS=	$(DYN_OBJ:%.o=$(PICDIR)/%.o)
61d29b2c44Sab196087EHDR_PICS=	$(EHDR_OBJ:%.o=$(PICDIR)/%.o)
62d29b2c44Sab196087PHDR_PICS=	$(PHDR_OBJ:%.o=$(PICDIR)/%.o)
63d29b2c44Sab196087SHDR_PICS=	$(SHDR_OBJ:%.o=$(PICDIR)/%.o)
64ad212f6fSab196087STR_PICS=	$(STR_OBJ:%.o=$(PICDIR)/%.o)
65d29b2c44Sab196087SYM_PICS=	$(SYM_OBJ:%.o=$(PICDIR)/%.o)
66d29b2c44Sab196087SYMINFO_PICS=	$(SYMINFO_OBJ:%.o=$(PICDIR)/%.o)
67d29b2c44Sab196087
68d29b2c44Sab196087LDLIBS +=	$(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \
69d29b2c44Sab196087		$(CONVLIBDIR) $(CONV_LIB) -lc
70d29b2c44Sab196087
71d29b2c44Sab196087$(CAP_LIB):=		PICS = $(CAP_PICS)
72d29b2c44Sab196087$(DYN_LIB):=		PICS = $(DYN_PICS)
73d29b2c44Sab196087$(EHDR_LIB):=		PICS = $(EHDR_PICS)
74d29b2c44Sab196087$(PHDR_LIB):=		PICS = $(PHDR_PICS)
75d29b2c44Sab196087$(SHDR_LIB):=		PICS = $(SHDR_PICS)
76ad212f6fSab196087$(STR_LIB):=		PICS = $(STR_PICS)
77d29b2c44Sab196087$(SYM_LIB):=		PICS = $(SYM_PICS)
78d29b2c44Sab196087$(SYMINFO_LIB):=	PICS = $(SYMINFO_PICS)
79d29b2c44Sab196087
80d29b2c44Sab196087$(CAP_LIB):=		SONAME = $(CAP_LIB)
81d29b2c44Sab196087$(DYN_LIB):=		SONAME = $(DYN_LIB)
82d29b2c44Sab196087$(EHDR_LIB):=		SONAME = $(EHDR_LIB)
83d29b2c44Sab196087$(PHDR_LIB):=		SONAME = $(PHDR_LIB)
84d29b2c44Sab196087$(SHDR_LIB):=		SONAME = $(SHDR_LIB)
85ad212f6fSab196087$(STR_LIB):=		SONAME = $(STR_LIB)
86d29b2c44Sab196087$(SYM_LIB):=		SONAME = $(SYM_LIB)
87d29b2c44Sab196087$(SYMINFO_LIB):=	SONAME = $(SYMINFO_LIB)
88d29b2c44Sab196087
89d29b2c44Sab196087# All the modules use a shared mapfile
90d29b2c44Sab196087MAPFILES = ../common/mapfile-vers
91d29b2c44Sab196087
92d29b2c44Sab196087CPPFLAGS +=	-I../../../include -I../../../include/$(MACH) \
93d29b2c44Sab196087		-I../$(SRCBASE)/lib/libc/inc  -D_REENTRANT
94d29b2c44Sab196087LLDFLAGS =	'-R$$ORIGIN/../../../lib'
95d29b2c44Sab196087LLDFLAGS64 =	'-R$$ORIGIN/../../../../lib/$(MACH64)'
9608278a5eSRod EvansLDFLAGS +=	$(CC_USE_PROTO) $(LLDFLAGS)
97d29b2c44Sab196087DYNFLAGS +=	$(VERSREF)
98d29b2c44Sab196087
99*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
100*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
101*7014882cSRichard Lowe
102d29b2c44Sab196087LINTFLAGS +=	-uaxs $(LDLIBS)
103d29b2c44Sab196087LINTFLAGS64 +=	-uaxs $(LDLIBS64)
104d29b2c44Sab196087
105d29b2c44Sab196087BLTDEFS =	$(ELFEDITLIBS:%.so=%_msg.h)
106d29b2c44Sab196087BLTDATA =	$(ELFEDITLIBS:%.so=%_msg.c)
107d29b2c44Sab196087BLTFILES =	$(BLTDEFS) $(BLTDATA)
108d29b2c44Sab196087
109d29b2c44Sab196087CLEANFILES +=	$(BLTFILES) $(LINTOUT) $(PICDIR)/*
110d29b2c44Sab196087CLOBBERFILES +=	$(ELFEDITLIBS)
111d29b2c44Sab196087
112d29b2c44Sab196087ROOTELFEDITDIR=		$(ROOT)/usr/lib/elfedit
113d29b2c44Sab196087ROOTELFEDITDIR64=	$(ROOT)/usr/lib/elfedit/$(MACH64)
114d29b2c44Sab196087ROOTELFEDITLIBS=	$(ROOTELFEDITDIR)/$(MTARG)$(CAP_LIB) \
115d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(DYN_LIB) \
116d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(EHDR_LIB) \
117d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(PHDR_LIB) \
118d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(SHDR_LIB) \
119ad212f6fSab196087			$(ROOTELFEDITDIR)/$(MTARG)$(STR_LIB) \
120d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(SYM_LIB) \
121d29b2c44Sab196087			$(ROOTELFEDITDIR)/$(MTARG)$(SYMINFO_LIB)
122d29b2c44Sab196087
123d29b2c44Sab196087
124d29b2c44Sab196087FILEMODE=	0755
125d29b2c44Sab196087
126d29b2c44Sab196087.PARALLEL:	$(ELFEDITLIBS)
127