3 #
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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24
25 LIBRARY = sn1_brand.a
26 VERS = .1
27 COBJS = sn1_brand.o
28 ASOBJS = crt.o handler.o runexe.o brand_util.o
29 OBJECTS = $(COBJS)
30
31 include ../../Makefile.sn1
32 include $(SRC)/lib/Makefile.lib
33
34 SRCDIR = ../common
35 UTSBASE = $(SRC)/uts
36
37 LIBS = $(DYNLIB)
38 CSRCS = $(COBJS:%o=../common/%c)
39 SHAREDOBJS = $(ASOBJS:%o=$(ISAOBJDIR)/%o)
40 SRCS = $(CSRCS)
41
42 #
50 # copies of libc in the same process and we don't want them to fight over
51 # the heap. So for our brand library we link against libmapmalloc so that
52 # if we (our or copy of libc) try to allocate any memory it will be done
53 # via mmap() instead of brk().
54 #
55 # XXX: Note that we also set the runtime path for the emulation library to
56 # point into /.SUNWnative/. This ensures that our brand library get's the
57 # native versions of any libraries it needs. Unfortunatly this is a total
58 # hack since it doesn't work for suid binaries. What we really need to do
59 # is enhance the linker so that when it's running on a brand linkmap it
60 # looks for all libraries in the brands "native" directory (for both
61 # regular and suid binaries).
62 #
63 NATIVE_DIR = /.SUNWnative
64 CPPFLAGS += -D_REENTRANT -U_ASM \
65 -I. -I$(BRAND_SHARED)/brand/sys -I$(UTSBASE)/common/brand/sn1
66 CFLAGS += $(CCVERBOSE)
67 DYNFLAGS += $(DYNFLAGS_$(CLASS))
68 DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
69 #DYNFLAGS += -R$(NATIVE_DIR)/lib -R$(NATIVE_DIR)/usr/lib
70 LDLIBS += -lc -lmapmalloc
71
72 $(LIBS):= PICS += $(SHAREDOBJS)
73
74 .KEEP_STATE:
75
76 all: $(LIBS)
77
78 lint: lintcheck
79
80 include $(SRC)/lib/Makefile.targ
|
3 #
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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2020 Joyent, Inc.
24 #
25
26 LIBRARY = sn1_brand.a
27 VERS = .1
28 COBJS = sn1_brand.o
29 ASOBJS = crt.o handler.o runexe.o brand_util.o
30 OBJECTS = $(COBJS)
31
32 include ../../Makefile.sn1
33 include $(SRC)/lib/Makefile.lib
34
35 SRCDIR = ../common
36 UTSBASE = $(SRC)/uts
37
38 LIBS = $(DYNLIB)
39 CSRCS = $(COBJS:%o=../common/%c)
40 SHAREDOBJS = $(ASOBJS:%o=$(ISAOBJDIR)/%o)
41 SRCS = $(CSRCS)
42
43 #
51 # copies of libc in the same process and we don't want them to fight over
52 # the heap. So for our brand library we link against libmapmalloc so that
53 # if we (our or copy of libc) try to allocate any memory it will be done
54 # via mmap() instead of brk().
55 #
56 # XXX: Note that we also set the runtime path for the emulation library to
57 # point into /.SUNWnative/. This ensures that our brand library get's the
58 # native versions of any libraries it needs. Unfortunatly this is a total
59 # hack since it doesn't work for suid binaries. What we really need to do
60 # is enhance the linker so that when it's running on a brand linkmap it
61 # looks for all libraries in the brands "native" directory (for both
62 # regular and suid binaries).
63 #
64 NATIVE_DIR = /.SUNWnative
65 CPPFLAGS += -D_REENTRANT -U_ASM \
66 -I. -I$(BRAND_SHARED)/brand/sys -I$(UTSBASE)/common/brand/sn1
67 CFLAGS += $(CCVERBOSE)
68 DYNFLAGS += $(DYNFLAGS_$(CLASS))
69 DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
70 #DYNFLAGS += -R$(NATIVE_DIR)/lib -R$(NATIVE_DIR)/usr/lib
71 LDLIBS += -lmapmalloc -lc
72
73 ZGUIDANCE = -zguidance=nounused
74 $(LIBS):= PICS += $(SHAREDOBJS)
75
76 .KEEP_STATE:
77
78 all: $(LIBS)
79
80 lint: lintcheck
81
82 include $(SRC)/lib/Makefile.targ
|