Print this page
12311 adjust NATIVE_LIBS in SMF makefiles
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/svc/configd/Makefile
+++ new/usr/src/cmd/svc/configd/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2015 RackTop Systems.
26 26 #
27 -# Copyright 2019 Joyent, Inc.
27 +# Copyright 2020 Joyent, Inc.
28 28 #
29 29
30 30 MYPROG = svc.configd
31 31 MYOBJS = \
32 32 backend.o \
33 33 configd.o \
34 34 client.o \
35 35 file_object.o \
36 36 maindoor.o \
37 37 object.o \
38 38 rc_node.o \
39 39 snapshot.o
40 40
41 41 PROG = $(MYPROG)
42 42 OBJS = $(MYOBJS)
43 43
44 44 SRCS = $(MYOBJS:%.o=%.c)
45 45
46 46 include ../../Makefile.cmd
47 47 include ../../Makefile.ctf
48 48
49 49 NATIVE_BUILD=$(POUND_SIGN)
50 50 $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
51 51 $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
52 52
53 53 ROOTCMDDIR= $(ROOT)/lib/svc/bin
54 54
55 55 MYCPPFLAGS = -I. -I../common -I../../../common/svc \
56 56 -I$(ROOT)/usr/include/sqlite-sys -D_REENTRANT
57 57 CPPFLAGS += $(MYCPPFLAGS)
58 58 CFLAGS += $(CCVERBOSE)
59 59 CERRWARN += -_gcc=-Wno-parentheses
60 60 CERRWARN += -_gcc=-Wno-type-limits
61 61 CERRWARN += -_gcc=-Wno-unused-label
62 62 CERRWARN += -_gcc=-Wno-unused-variable
63 63 CERRWARN += -_gcc=-Wno-unused-function
64 64 CERRWARN += $(CNOWARN_UNINIT)
65 65
66 66 # strange false positive
67 67 SMOFF += free
68 68
69 69 MYLDLIBS = -lumem -luutil
70 70 LDLIBS += -lsecdb -lbsm $(MYLDLIBS)
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
71 71
72 72 CLOBBERFILES += $(MYPROG:%=%-native)
73 73
74 74 LIBUUTIL = $(SRC)/lib/libuutil
75 75 LIBSCF = $(SRC)/lib/libscf
76 76
77 77 SCRIPTFILE = restore_repository
78 78 ROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE)
79 79
80 80 #
81 -# Native variant (used in ../seed)
81 +# Native variant (used in ../seed). We only need to set NATIVE_LIBS if
82 +# $(ADJUNCT_PROTO) is pointing outside of /usr/lib.
82 83 #
84 +$(NO_ADJUNCT_PROTO)NATIVE_LIBS += libumem.so libc.so
83 85 $(NATIVE_BUILD)CC = $(NATIVECC)
84 86 $(NATIVE_BUILD)LD = $(NATIVELD)
85 87 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
86 88 $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc
87 89 $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
88 90 $(NATIVE_BUILD)LDFLAGS = $(BDIRECT)
89 91 $(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
90 92 -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS)
91 93
92 94 DIRMODE = 0755
93 95 FILEMODE = 0555
94 96
95 97 OBJSQLITE =
96 98 LIBSQLITE = -lsqlite-sys
97 99 $(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/libsqlite-native.o
98 100 $(NATIVE_BUILD)LIBSQLITE =
99 101
100 102 OBJS += $(OBJSQLITE)
101 103 LDLIBS += $(LIBSQLITE)
102 104
103 105 install := TARGET = install
104 106 clobber := TARGET = clobber
105 107
106 108 .KEEP_STATE:
107 109 .PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o)
108 110
109 111 all: $(PROG)
110 112
111 113 native: FRC
112 114 @cd $(LIBUUTIL)/native; pwd; $(MAKE) $(MFLAGS) install
113 115 @NATIVE_BUILD= $(MAKE) $(MFLAGS) all
114 116
115 117 $(PROG): $(OBJS)
116 118 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
117 119 $(POST_PROCESS)
118 120
119 121 %-native.o: %.c
120 122 $(COMPILE.c) -o $@ $<
121 123 $(POST_PROCESS_O)
122 124
123 125 $(ROOTCMDDIR)/%: %.sh
124 126 $(INS.rename)
125 127
126 128 install: all $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE)
127 129
128 130 clean: FRC
129 131 $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
130 132
131 133 clobber:
132 134
133 135 include ../../Makefile.targ
134 136
135 137 FRC:
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX