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 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
25 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26 #
27
28 #
29 # The build process for libdisasm is sightly different from that used by other
30 # libraries, because libdisasm must be built in two flavors - as a standalone
31 # for use by kmdb and as a normal library. We use $(CURTYPE) to indicate the
32 # current flavor being built.
33 #
34
35 LIBRARY= libdisasm.a
36 STANDLIBRARY= libstanddisasm.so
37 VERS= .1
38
39 # By default, we build the shared library. Construction of the standalone
40 # is specifically requested by architecture-specific Makefiles.
41 TYPES= library
42 CURTYPE= library
43
44 COMDIR= $(SRC)/lib/libdisasm/common
45
46 #
47 # Architecture-independent files
48 #
49 SRCS_common= $(COMDIR)/libdisasm.c
50 OBJECTS_common= libdisasm.o
51
52 #
53 # Architecture-dependent disassembly files
54 #
55 SRCS_i386= $(COMDIR)/dis_i386.c \
56 $(SRC)/common/dis/i386/dis_tables.c
57 SRCS_sparc= $(COMDIR)/dis_sparc.c \
58 $(COMDIR)/dis_sparc_fmt.c \
59 $(COMDIR)/dis_sparc_instr.c
60 SRCS_s390x= $(COMDIR)/dis_s390x.c
61
62 OBJECTS_i386= dis_i386.o \
63 dis_tables.o
64 OBJECTS_sparc= dis_sparc.o \
65 dis_sparc_fmt.o \
66 dis_sparc_instr.o
67 OBJECTS_s390x= dis_s390x.o
68
69 #
70 # We build the regular shared library with support for all architectures.
71 # The standalone version should only contain code for the native
72 # architecture to reduce the memory footprint of kmdb.
73 #
74 OBJECTS_library= $(OBJECTS_common) \
75 $(OBJECTS_i386) \
76 $(OBJECTS_sparc) \
77 $(OBJECTS_s390x)
78 OBJECTS_standalone= $(OBJECTS_common) \
79 $(OBJECTS_$(MACH))
80 OBJECTS= $(OBJECTS_$(CURTYPE))
81
82 include $(SRC)/lib/Makefile.lib
83
84 SRCS_library= $(SRCS_common) \
85 $(SRCS_i386) \
86 $(SRCS_sparc) \
87 $(SRCS_s390x)
88 SRCS_standalone= $(SRCS_common) \
89 $(SRCS_$(MACH))
90 SRCS= $(SRCS_$(CURTYPE))
91
92 #
93 # Used to verify that the standalone doesn't have any unexpected external
94 # dependencies.
95 #
96 LINKTEST_OBJ = objs/linktest_stand.o
97
98 CLOBBERFILES_standalone = $(LINKTEST_OBJ)
99 CLOBBERFILES += $(CLOBBERFILES_$(CURTYPE))
100
101 LIBS_standalone = $(STANDLIBRARY)
102 LIBS_library = $(DYNLIB) $(LINTLIB)
103 LIBS = $(LIBS_$(CURTYPE))
104
105 MAPFILES = $(COMDIR)/mapfile-vers
106
107 LDLIBS += -lc
|
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 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
25 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26 # Copyright (c) 2018, Joyent, Inc.
27 #
28
29 #
30 # The build process for libdisasm is sightly different from that used by other
31 # libraries, because libdisasm must be built in two flavors - as a standalone
32 # for use by kmdb and as a normal library. We use $(CURTYPE) to indicate the
33 # current flavor being built.
34 #
35
36 LIBRARY= libdisasm.a
37 STANDLIBRARY= libstanddisasm.so
38 VERS= .1
39
40 # By default, we build the shared library. Construction of the standalone
41 # is specifically requested by architecture-specific Makefiles.
42 TYPES= library
43 CURTYPE= library
44
45 COMDIR= $(SRC)/lib/libdisasm/common
46
47 #
48 # Architecture-independent files
49 #
50 SRCS_common= $(COMDIR)/libdisasm.c
51 OBJECTS_common= libdisasm.o
52
53 #
54 # Architecture-dependent disassembly files
55 #
56 SRCS_i386= $(COMDIR)/dis_i386.c \
57 $(SRC)/common/dis/i386/dis_tables.c
58 SRCS_sparc= $(COMDIR)/dis_sparc.c \
59 $(COMDIR)/dis_sparc_fmt.c \
60 $(COMDIR)/dis_sparc_instr.c
61 SRCS_s390x= $(COMDIR)/dis_s390x.c
62 SRCS_riscv= $(COMDIR)/dis_riscv.c
63
64 OBJECTS_i386= dis_i386.o \
65 dis_tables.o
66 OBJECTS_sparc= dis_sparc.o \
67 dis_sparc_fmt.o \
68 dis_sparc_instr.o
69 OBJECTS_s390x= dis_s390x.o
70 OBJECTS_riscv= dis_riscv.o
71
72 #
73 # We build the regular shared library with support for all architectures.
74 # The standalone version should only contain code for the native
75 # architecture to reduce the memory footprint of kmdb.
76 #
77 OBJECTS_library= $(OBJECTS_common) \
78 $(OBJECTS_i386) \
79 $(OBJECTS_sparc) \
80 $(OBJECTS_s390x) \
81 $(OBJECTS_riscv)
82 OBJECTS_standalone= $(OBJECTS_common) \
83 $(OBJECTS_$(MACH))
84 OBJECTS= $(OBJECTS_$(CURTYPE))
85
86 include $(SRC)/lib/Makefile.lib
87
88 SRCS_library= $(SRCS_common) \
89 $(SRCS_i386) \
90 $(SRCS_sparc) \
91 $(SRCS_s390x) \
92 $(SRCS_riscv) \
93 SRCS_standalone= $(SRCS_common) \
94 $(SRCS_$(MACH))
95 SRCS= $(SRCS_$(CURTYPE))
96
97 #
98 # Used to verify that the standalone doesn't have any unexpected external
99 # dependencies.
100 #
101 LINKTEST_OBJ = objs/linktest_stand.o
102
103 CLOBBERFILES_standalone = $(LINKTEST_OBJ)
104 CLOBBERFILES += $(CLOBBERFILES_$(CURTYPE))
105
106 LIBS_standalone = $(STANDLIBRARY)
107 LIBS_library = $(DYNLIB) $(LINTLIB)
108 LIBS = $(LIBS_$(CURTYPE))
109
110 MAPFILES = $(COMDIR)/mapfile-vers
111
112 LDLIBS += -lc
|