Print this page
8411 Build should warn when linking against libraries outside proto area
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/hal/tools/Makefile
+++ new/usr/src/cmd/hal/tools/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.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 +# Copyright 2017 RackTop Systems.
26 +#
25 27
26 28 SUBDIR = sunos
27 29
28 30 HAL_PROG = hal-device hal-find-by-capability hal-find-by-property \
29 31 hal-get-property hal-set-property lshal
30 32
31 33 HAL_LIB = hal-is-caller-privileged
32 34
33 35 SCRIPT_BIN = hal-fdi-validate
34 36
35 37 SCRIPT_LIB = hal-system-lcd-set-brightness hal-system-lcd-get-brightness \
36 38 hal-system-power-hibernate hal-system-power-suspend \
37 39 hal-system-power-reboot hal-system-power-shutdown hal-functions
38 40
39 41 STORAGE_METHOD_PROG = hal-storage-closetray hal-storage-eject \
40 42 hal-storage-mount hal-storage-unmount \
41 43 hal-storage-zpool-export hal-storage-zpool-import
42 44
43 45 STORAGE_PROG = $(STORAGE_METHOD_PROG) \
44 46 hal-storage-cleanup-mountpoint \
45 47 hal-storage-cleanup-all-mountpoints
46 48
47 49 PROGSRCS = $(PROG:%=%.c) $(STORAGE_PROG:%=%.c)
48 50
49 51
50 52 STORAGE_OBJS = $(STORAGE_PROG:%=%.o)
51 53 STORAGE_SHAREDOBJS = hal-storage-shared.o adt_data.o
52 54 STORAGE_SHAREDSRCS = $(STORAGE_SHAREDOBJS:%.o=%.c) $(STORAGE_SHAREDOBJS:%.o=../utils/%.c)
53 55
54 56 SRCS = $(PROGSRCS) $(STORAGE_SHAREDSRCS)
55 57
56 58 CLOBBERFILES += $(HAL_PROG) $(STORAGE_PROG) $(SCRIPT_BIN) $(SCRIPT_LIB) $(HAL_LIB)
57 59 CLEANFILES += $(STORAGE_SHAREDOBJS) $(STORAGE_OBJS) hal-storage-zpool.o
58 60
59 61 include ../../Makefile.cmd
60 62 include ../Makefile.hal
61 63
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
62 64 $(HAL_PROG) := LDLIBS += -lc -ldbus-1 -lhal
63 65
64 66 lshal := LDLIBS += -ldbus-glib-1 -lglib-2.0
65 67
66 68 $(HAL_LIB) := LDLIBS += -lc -ldbus-1 -lpolkit $(ZIGNORE) -lglib-2.0
67 69
68 70 $(STORAGE_PROG) := LDLIBS += -lc -ldbus-1 -lglib-2.0 -lhal -lhal-storage -lbsm
69 71
70 72 $(STORAGE_METHOD_PROG) := LDLIBS += -lpolkit
71 73
74 +# Allow HAL to take some of its dependencies from outside the proto area.
75 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-1.so
76 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-glib-1.so
77 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libglib-2.0.so
78 +
72 79 CPPFLAGS += $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS)
73 80 CPPFLAGS += -I$(ROOT)/usr/include/hal
74 81 CPPFLAGS += -I$(ROOT)/usr/include/libpolkit
75 82 C99MODE = $(C99_ENABLE)
76 83
77 84 ROOTUSRSBINPROG = $(HAL_PROG:%=$(ROOTUSRSBIN)/%) \
78 85 $(SCRIPT_BIN:%=$(ROOTUSRSBIN)/%)
79 86
80 87 ROOTCMDDIR = $(ROOTLIB_HAL)
81 88 ROOTCMD = $(STORAGE_PROG:%=$(ROOTCMDDIR)/%) \
82 89 $(HAL_LIB:%=$(ROOTCMDDIR)/%) \
83 90 $(SCRIPT_LIB:%=$(ROOTCMDDIR)/%)
84 91
85 92 all := TARGET= all
86 93 install := TARGET= install
87 94 clean := TARGET= clean
88 95 clobber := TARGET= clobber
89 96
90 97 .KEEP_STATE:
91 98
92 99 all: $(HAL_PROG) $(STORAGE_PROG) $(SCRIPT_BIN) $(SCRIPT_LIB) $(HAL_LIB) $(SUBDIR)
93 100
94 101 hal-storage-shared.o: hal-storage-shared.c
95 102 $(COMPILE.c) -o $@ hal-storage-shared.c
96 103
97 104 adt_data.o: ../utils/adt_data.c
98 105 $(COMPILE.c) -o $@ ../utils/adt_data.c
99 106
100 107 hal-storage-closetray: hal-storage-closetray.o $(STORAGE_SHAREDOBJS)
101 108 $(LINK.c) hal-storage-closetray.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
102 109 $(POST_PROCESS)
103 110
104 111 hal-storage-eject: hal-storage-eject.o $(STORAGE_SHAREDOBJS)
105 112 $(LINK.c) hal-storage-eject.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
106 113 $(POST_PROCESS)
107 114
108 115 hal-storage-mount: hal-storage-mount.o $(STORAGE_SHAREDOBJS)
109 116 $(LINK.c) hal-storage-mount.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
110 117 $(POST_PROCESS)
111 118
112 119 hal-storage-unmount: hal-storage-unmount.o $(STORAGE_SHAREDOBJS)
113 120 $(LINK.c) hal-storage-unmount.o $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
114 121 $(POST_PROCESS)
115 122
116 123 hal-storage-cleanup-mountpoint: hal-storage-cleanup-mountpoint.c \
117 124 $(STORAGE_SHAREDOBJS)
118 125 $(LINK.c) hal-storage-cleanup-mountpoint.c \
119 126 $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
120 127 $(POST_PROCESS)
121 128
122 129 hal-storage-cleanup-all-mountpoints: hal-storage-cleanup-all-mountpoints.c \
123 130 $(STORAGE_SHAREDOBJS)
124 131 $(LINK.c) hal-storage-cleanup-all-mountpoints.c \
125 132 $(STORAGE_SHAREDOBJS) -o $@ $(LDLIBS)
126 133 $(POST_PROCESS)
127 134
128 135 hal-storage-zpool-export: hal-storage-zpool.c $(STORAGE_SHAREDOBJS)
129 136 $(LINK.c) -o $@ $(STORAGE_SHAREDOBJS) -DZPOOL_SUBCMD=\"export\" hal-storage-zpool.c $(LDLIBS)
130 137 $(POST_PROCESS)
131 138
132 139 hal-storage-zpool-import: hal-storage-zpool.c $(STORAGE_SHAREDOBJS)
133 140 $(LINK.c) -o $@ $(STORAGE_SHAREDOBJS) -DZPOOL_SUBCMD=\"import\" hal-storage-zpool.c $(LDLIBS)
134 141 $(POST_PROCESS)
135 142
136 143 hal-device: hal-device.c
137 144 $(LINK.c) -o $@ hal-device.c $(LDLIBS)
138 145 $(POST_PROCESS)
139 146
140 147 hal-find-by-capability: hal_find_by_capability.c
141 148 $(LINK.c) -o $@ hal_find_by_capability.c $(LDLIBS)
142 149 $(POST_PROCESS)
143 150
144 151 hal-find-by-property: hal_find_by_property.c
145 152 $(LINK.c) -o $@ hal_find_by_property.c $(LDLIBS)
146 153 $(POST_PROCESS)
147 154
148 155 hal-get-property: hal_get_property.c
149 156 $(LINK.c) -o $@ hal_get_property.c $(LDLIBS)
150 157 $(POST_PROCESS)
151 158
152 159 hal-set-property: hal_set_property.c
153 160 $(LINK.c) -o $@ hal_set_property.c $(LDLIBS)
154 161 $(POST_PROCESS)
155 162
156 163 lshal: lshal.c
157 164 $(LINK.c) -o $@ lshal.c $(LDLIBS)
158 165 $(POST_PROCESS)
159 166
160 167 install: all $(ROOTUSRSBINPROG) $(ROOTCMD) $(SUBDIR)
161 168
162 169 clean: $(SUBDIR)
163 170 $(RM) $(CLEANFILES)
164 171
165 172 $(SUBDIR): FRC
166 173 @cd $@; pwd; $(MAKE) $(TARGET)
167 174
168 175 FRC:
169 176
170 177 include ../../Makefile.targ
↓ open down ↓ |
89 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX