Makefile.com revision 12927:a27c46eb192b
1234971Sdim#
2234971Sdim# CDDL HEADER START
3234971Sdim#
4234971Sdim# The contents of this file are subject to the terms of the
5234971Sdim# Common Development and Distribution License (the "License").
6234971Sdim# You may not use this file except in compliance with the License.
7234971Sdim#
8234971Sdim# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9234971Sdim# or http://www.opensolaris.org/os/licensing.
10234971Sdim# See the License for the specific language governing permissions
11234971Sdim# and limitations under the License.
12234971Sdim#
13243830Sdim# When distributing Covered Code, include this CDDL HEADER in each
14234971Sdim# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15234971Sdim# If applicable, add the following below this CDDL HEADER, with the
16234971Sdim# fields enclosed by brackets "[]" replaced with your own identifying
17234971Sdim# information: Portions Copyright [yyyy] [name of copyright owner]
18234971Sdim#
19263508Sdim# CDDL HEADER END
20234971Sdim#
21234971Sdim#
22234971Sdim# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23234971Sdim#
24234971Sdim
25234971SdimLIBRARY=	libelf.a
26234971SdimVERS=		.1
27234971SdimM4=		m4
28234971Sdim
29234971SdimMACHOBJS=
30234971SdimCOMOBJS=	ar.o		begin.o		cntl.o		cook.o \
31243830Sdim		data.o		end.o		fill.o		flag.o \
32234971Sdim		getarhdr.o	getarsym.o	getbase.o	getdata.o \
33234971Sdim		getehdr.o	getident.o	getphdr.o	getscn.o \
34234971Sdim		getshdr.o \
35234971Sdim		getphnum.o	getshnum.o	getshstrndx.o \
36243830Sdim		hash.o		input.o		kind.o \
37234971Sdim		ndxscn.o	newdata.o	newehdr.o	newphdr.o \
38234971Sdim		newscn.o	next.o		nextscn.o	output.o \
39234971Sdim		rand.o		rawdata.o	rawfile.o	rawput.o \
40234971Sdim		strptr.o	update.o	error.o		gelf.o \
41234971Sdim		clscook.o	checksum.o
42234971SdimCLASSOBJS=	clscook64.o	newehdr64.o	newphdr64.o	update64.o \
43234971Sdim		checksum64.o
44234971SdimBLTOBJS=	msg.o		xlate.o		xlate64.o
45MISCOBJS=	String.o	args.o		demangle.o	nlist.o \
46		nplist.o
47MISCOBJS64=	nlist.o
48
49OBJECTS=	$(BLTOBJS)  $(MACHOBJS)  $(COMOBJS)  $(CLASSOBJS) $(MISCOBJS)
50
51include $(SRC)/lib/Makefile.lib
52
53DEMOFILES=	Makefile	00README	acom.c		dcom.c \
54		pcom.c		tpcom.c		dispsyms.c
55DEMOFILESRCDIR=	../demo
56ROOTDEMODIRBASE=$(ROOT)/usr/demo/ELF
57ROOTDEMODIRS=   $(ROOTDEMODIRBASE)
58
59include $(SRC)/cmd/sgs/Makefile.com
60
61WARLOCKFILES=	$(OBJECTS:%.o=wlocks/%.ll)
62
63MAPFILES =	../common/mapfile-vers
64
65CLOBBERFILES +=
66
67DYNFLAGS +=	$(VERSREF)
68LDLIBS +=	$(CONVLIBDIR) $(CONV_LIB) -lc
69
70LINTFLAGS +=	-u -erroff=E_BAD_PTR_CAST_ALIGN
71LINTFLAGS64 +=	-u -erroff=E_CAST_INT_TO_SMALL_INT
72
73BUILD.AR=	$(RM) $@ ; \
74		$(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)`
75		$(POST_PROCESS_A)
76
77
78BLTDEFS=	msg.h
79BLTDATA=	msg.c
80BLTMESG=	$(SGSMSGDIR)/libelf
81
82BLTFILES=	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
83
84SGSMSGCOM=	../common/libelf.msg
85SGSMSG32=	../common/libelf.32.msg
86SGSMSGTARG=	$(SGSMSGCOM)
87SGSMSGALL=	$(SGSMSGCOM) $(SGSMSG32)
88
89SGSMSGFLAGS1=	$(SGSMSGFLAGS) -m $(BLTMESG)
90SGSMSGFLAGS2=	$(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libelf_msg
91
92BLTSRCS=	$(BLTOBJS:%.o=%.c)
93LIBSRCS=	$(COMOBJS:%.o=../common/%.c)  $(MISCOBJS:%.o=../misc/%.c) \
94		$(MACHOBJS:%.o=%.c)  $(BLTSRCS)
95SRCS=		../common/llib-lelf
96LINTSRCS=	$(LIBSRCS) ../common/lintsup.c
97
98ROOTFS_DYNLIB=		$(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
99ROOTFS_LINTLIB=		$(LINTLIB:%=$(ROOTFS_LIBDIR)/%)
100
101ROOTFS_DYNLIB64=	$(DYNLIB:%=$(ROOTFS_LIBDIR64)/%)
102ROOTFS_LINTLIB64=	$(LINTLIB:%=$(ROOTFS_LIBDIR64)/%)
103
104$(ROOTFS_DYNLIB) :=	FILEMODE= 755
105$(ROOTFS_DYNLIB64) :=	FILEMODE= 755
106
107LIBS =		$(DYNLIB) $(LINTLIB)
108
109CLEANFILES +=	$(LINTOUTS) $(BLTSRCS) $(BLTFILES) $(WARLOCKFILES)
110
111.PARALLEL:	$(LIBS)
112