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) 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24 # Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 #
26
27 COBJS = brand_util.o
28 ASOBJS = crt.o handler.o runexe.o
29 OFFSETS_SRC = ../common/offsets.in
30 OFFSETS_H = assym.h
31 OBJECTS = $(COBJS) $(ASOBJS)
32 CLOBBERFILES += $(OFFSETS_H)
33
34 include $(SRC)/lib/Makefile.lib
35
36 SRCDIR = ../common
37 CSRCS = $(COBJS:%o=../common/%c)
38 ASSRCS = $(ASOBJS:%o=$(ISASRCDIR)/%s)
39 SRCS = $(CSRCS) $(ASSRCS)
40
41 #
42 # Ugh, this is a gross hack. Our assembly routines uses lots of defines
43 # to simplify variable access. All these defines work fine for amd64
44 # compiles because when compiling for amd64 we use the GNU assembler,
45 # gas. For 32-bit code we use the Sun assembler, as. Unfortunatly
57
58 #
59 # build the offset header before trying to compile any files. (it's included
60 # by brand_misc.h, so it's needed for all objects, not just assembly ones.)
61 #
62 # Note we have to build assym.h via its dependency on pics/% so that the
63 # target dependent assignment of CTF_FLAGS will be there, otherwise make
64 # will see two different commands to build it (endless rebuilds).
65 #
66 all: pics .WAIT $$(PICS)
67
68 lint: lintcheck
69
70 $(OBJECTS:%=pics/%): $(OFFSETS_H)
71
72 $(OFFSETS_H): $(OFFSETS_SRC)
73 $(OFFSETS_CREATE) < $(OFFSETS_SRC) >$@
74
75 pics/%.o: $(ISASRCDIR)/%.s
76 $(COMPILE.s) -o $@ $<
77 $(POST_PROCESS_O)
78
79 include $(SRC)/lib/Makefile.targ
|
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) 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24 # Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 #
26 # Copyright (c) 2019, Joyent, Inc.
27 #
28
29 COBJS = brand_util.o
30 ASOBJS = crt.o handler.o runexe.o
31 OFFSETS_SRC = ../common/offsets.in
32 OFFSETS_H = assym.h
33 OBJECTS = $(COBJS) $(ASOBJS)
34 CLOBBERFILES += $(OFFSETS_H)
35
36 include $(SRC)/lib/Makefile.lib
37
38 SRCDIR = ../common
39 CSRCS = $(COBJS:%o=../common/%c)
40 ASSRCS = $(ASOBJS:%o=$(ISASRCDIR)/%s)
41 SRCS = $(CSRCS) $(ASSRCS)
42
43 #
44 # Ugh, this is a gross hack. Our assembly routines uses lots of defines
45 # to simplify variable access. All these defines work fine for amd64
46 # compiles because when compiling for amd64 we use the GNU assembler,
47 # gas. For 32-bit code we use the Sun assembler, as. Unfortunatly
59
60 #
61 # build the offset header before trying to compile any files. (it's included
62 # by brand_misc.h, so it's needed for all objects, not just assembly ones.)
63 #
64 # Note we have to build assym.h via its dependency on pics/% so that the
65 # target dependent assignment of CTF_FLAGS will be there, otherwise make
66 # will see two different commands to build it (endless rebuilds).
67 #
68 all: pics .WAIT $$(PICS)
69
70 lint: lintcheck
71
72 $(OBJECTS:%=pics/%): $(OFFSETS_H)
73
74 $(OFFSETS_H): $(OFFSETS_SRC)
75 $(OFFSETS_CREATE) < $(OFFSETS_SRC) >$@
76
77 pics/%.o: $(ISASRCDIR)/%.s
78 $(COMPILE.s) -o $@ $<
79 $(POST_PROCESS_S_O)
80
81 include $(SRC)/lib/Makefile.targ
|