4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2016 RackTop Systems.
32 pics/%64.o: ../common/%.c
33 $(COMPILE.c) -D_ELF64 -o $@ $<
38 $(COMPILE.c) -DELF -o $@ $<
42 pics/%.o: ../common/%.c
46 all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
48 install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \
50 .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) \
51 $(ROOTFS_LIBDIR)/$(LINTLIBSRC)
53 $(ROOTFS_LIBDIR)/$(LINTLIBSRC): ../common/$(LINTLIBSRC)
54 $(VAR_POUND_1) $(INS.file) ../common/$(LINTLIBSRC)
56 lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT)
58 .PARALLEL: $(LINTOUT32) $(LINTOUT64)
65 $(SYMLINK) $(DYNLIB) $(LIBLINKS)
67 CLOBBERFILES += $(LIBLINKS)
69 # include common library targets
71 include $(SRC)/lib/Makefile.targ
72 include $(SRC)/cmd/sgs/Makefile.targ
74 xlate.c: ../common/xlate.m4
75 $(M4) < ../common/xlate.m4 > xlate.c
77 xlate64.c: ../common/xlate64.m4
78 $(M4) < ../common/xlate64.m4 > xlate64.c
93 # Special target for native builds (ie. when we need to build a version of ld
94 # to build a version of ld :-).
96 native: $(SGSLIBDIR)/$(LIBLINKS)
100 $(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
104 $(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
105 -@$(RM) $(SGSLIBDIR)/$(LIBLINKS)
106 $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
109 # Derived source and header files (messaging). Make sure that the sgsmsg
110 # command is constructed - libelf might not be built with the whole sgs.
115 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
118 $(BLTDATA): $(SGSMSG) $(SGSMSGTARG)
119 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
121 $(BLTMESG): $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
122 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
125 @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog