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 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
23 #
24
25 # This target builds both a command (daemon) and various shared objects. This
26 # isn't a typical target, and the inclusion of both library and command
27 # Makefiles were probably not in their original design. However, there doesn't
28 # presently seem to be a clash of any required definitions.
29 include ../../../lib/Makefile.lib
30 include ../../Makefile.cmd
31
32 COMMON = ..
33 UTSBASE = $(COMMON)/../../uts
34
35 DEVFSADM_MOD = devfsadm
36
37 DEVALLOCSRC = devalloc.c
38
39 PLCYSRC = devpolicy.c plcysubr.c
40
41 MODLOADDIR = $(COMMON)/../modload
42
43 DEVFSADM_SRC = $(COMMON)/$(DEVFSADM_MOD:%=%.c) \
44 $(DEVALLOCSRC:%=$(COMMON)/%) $(PLCYSRC:%=$(COMMON)/%)
45 DEVFSADM_OBJ = $(DEVFSADM_MOD:%=%.o) $(DEVALLOCSRC:%.c=%.o) $(PLCYSRC:%.c=%.o)
46
47 DEVFSADM_DAEMON = devfsadmd
48
49 LINKMOD_DIR = linkmod
50 DEVFSADM_DIR = devfsadm
51
52 CLOBBERFILES = $(MODS) $(DEVLINKTAB) $(DEVFSCOMPATLINKS) $(DEVFSADM_DAEMON)
53 CLOBBERFILES += $(POFILE) $(POFILES) ../plcysubr.c
54
55 LINK_OBJS_CMN = \
56 disk_link.o \
57 ieee1394_link.o \
58 dcam1394_link.o \
59 tape_link.o \
60 usb_link.o \
61 port_link.o \
62 audio_link.o \
63 cfg_link.o \
64 misc_link.o \
65 lofi_link.o \
66 ramdisk_link.o \
67 fssnap_link.o \
68 sgen_link.o \
69 smp_link.o \
70 dtrace_link.o \
71 vscan_link.o \
72 zfs_link.o \
73 zut_link.o
74
75 LINK_OBJS = $(LINK_OBJS_CMN) \
76 $(LINK_OBJS_$(MACH))
77
78 LINK_SRCS = $(LINK_OBJS_CMN:%.o=$(COMMON)/%.c) \
79 $(LINK_OBJS_$(MACH):%.o=%.c)
80
81 LINT_MODULES = $(LINK_SRCS:%.c=%.ln)
82
83 LINK_MODS = $(LINK_OBJS:%.o=SUNW_%.so)
84
85 DEVLINKTAB = devlink.tab
86 DEVLINKTAB_SRC = $(COMMON)/$(DEVLINKTAB).sh
87
88 COMPAT_LINKS = disks tapes ports audlinks devlinks drvconfig
89
90 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
91 -I$(COMMON) -I$(UTSBASE)/common -I$(MODLOADDIR)
92 CFLAGS += $(CCVERBOSE) $(C_PICFLAGS)
93
94 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
95 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
96 LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
97
98 CERRWARN += -_gcc=-Wno-uninitialized
99 CERRWARN += -_gcc=-Wno-char-subscripts
100 CERRWARN += -_gcc=-Wno-parentheses
101
102 # Define the dependencies required by devfsadm and all shared objects.
103 LDLIBS += -ldevinfo
104 devfsadm := LDLIBS += -lgen -lsysevent -lnvpair -lzonecfg -lbsm
105 SUNW_md_link.so := LDLIBS += -lmeta
106 SUNW_disk_link.so := LDLIBS += -ldevid
107 SUNW_sgen_link.so := LDLIBS += -ldevid
108
109 # All libraries are built from the same SUNW_%.so rule (see below), and define
110 # their own SONAME using -h explicitly. Null the generic -h macro that gets
111 # inherited from Makefile.lib, otherwise we'll get two -h definitions.
|
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 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
23 #
24
25 # This target builds both a command (daemon) and various shared objects. This
26 # isn't a typical target, and the inclusion of both library and command
27 # Makefiles were probably not in their original design. However, there doesn't
28 # presently seem to be a clash of any required definitions.
29 include ../../../lib/Makefile.lib
30 include ../../Makefile.cmd
31
32 COMMON = ..
33 UTSBASE = $(COMMON)/../../uts
34 KRRPBASE = $(COMMON)/../../common
35
36 DEVFSADM_MOD = devfsadm
37
38 DEVALLOCSRC = devalloc.c
39
40 PLCYSRC = devpolicy.c plcysubr.c
41
42 MODLOADDIR = $(COMMON)/../modload
43
44 DEVFSADM_SRC = $(COMMON)/$(DEVFSADM_MOD:%=%.c) \
45 $(DEVALLOCSRC:%=$(COMMON)/%) $(PLCYSRC:%=$(COMMON)/%)
46 DEVFSADM_OBJ = $(DEVFSADM_MOD:%=%.o) $(DEVALLOCSRC:%.c=%.o) $(PLCYSRC:%.c=%.o)
47
48 DEVFSADM_DAEMON = devfsadmd
49
50 LINKMOD_DIR = linkmod
51 DEVFSADM_DIR = devfsadm
52
53 CLOBBERFILES = $(MODS) $(DEVLINKTAB) $(DEVFSCOMPATLINKS) $(DEVFSADM_DAEMON)
54 CLOBBERFILES += $(POFILE) $(POFILES) ../plcysubr.c
55
56 LINK_OBJS_CMN = \
57 disk_link.o \
58 ieee1394_link.o \
59 dcam1394_link.o \
60 tape_link.o \
61 usb_link.o \
62 port_link.o \
63 audio_link.o \
64 cfg_link.o \
65 misc_link.o \
66 lofi_link.o \
67 ramdisk_link.o \
68 fssnap_link.o \
69 sgen_link.o \
70 smp_link.o \
71 dtrace_link.o \
72 vscan_link.o \
73 krrp_link.o \
74 zfs_link.o \
75 zut_link.o
76
77 LINK_OBJS = $(LINK_OBJS_CMN) \
78 $(LINK_OBJS_$(MACH))
79
80 LINK_SRCS = $(LINK_OBJS_CMN:%.o=$(COMMON)/%.c) \
81 $(LINK_OBJS_$(MACH):%.o=%.c)
82
83 LINT_MODULES = $(LINK_SRCS:%.c=%.ln)
84
85 LINK_MODS = $(LINK_OBJS:%.o=SUNW_%.so)
86
87 DEVLINKTAB = devlink.tab
88 DEVLINKTAB_SRC = $(COMMON)/$(DEVLINKTAB).sh
89
90 COMPAT_LINKS = disks tapes ports audlinks devlinks drvconfig
91
92 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
93 -I$(COMMON) -I$(UTSBASE)/common -I$(MODLOADDIR) -I$(KRRPBASE)
94 CFLAGS += $(CCVERBOSE) $(C_PICFLAGS)
95
96 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
97 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
98 LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
99
100 CERRWARN += -_gcc=-Wno-uninitialized
101 CERRWARN += -_gcc=-Wno-char-subscripts
102 CERRWARN += -_gcc=-Wno-parentheses
103
104 # Define the dependencies required by devfsadm and all shared objects.
105 LDLIBS += -ldevinfo
106 devfsadm := LDLIBS += -lgen -lsysevent -lnvpair -lzonecfg -lbsm
107 SUNW_md_link.so := LDLIBS += -lmeta
108 SUNW_disk_link.so := LDLIBS += -ldevid
109 SUNW_sgen_link.so := LDLIBS += -ldevid
110
111 # All libraries are built from the same SUNW_%.so rule (see below), and define
112 # their own SONAME using -h explicitly. Null the generic -h macro that gets
113 # inherited from Makefile.lib, otherwise we'll get two -h definitions.
|