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) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2016 RackTop Systems.
24 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
25 #
26
27 objs/%.o \
28 pics/%.o: %.c
29 $(COMPILE.c) -o $@ $<
30 $(POST_PROCESS_O)
31
32 objs/%64.o \
33 pics/%64.o: ../common/%.c
34 $(COMPILE.c) -D_ELF64 -o $@ $<
35 $(POST_PROCESS_O)
36
37 objs/%.o \
38 pics/%.o: ../misc/%.c
39 $(COMPILE.c) -DELF -o $@ $<
40 $(POST_PROCESS_O)
41
42 objs/%.o \
43 pics/%.o: ../common/%.c
44 $(COMPILE.c) -o $@ $<
45 $(POST_PROCESS_O)
46
47 all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
48
49 install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \
50 .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
51
52 delete:
53 $(RM) $(DYNLIB)
54
55 $(LIBLINKS):
56 $(RM) $(LIBLINKS)
57 $(SYMLINK) $(DYNLIB) $(LIBLINKS)
58
59 CLOBBERFILES += $(LIBLINKS)
60
61 # include common library targets
62 #
63 include $(SRC)/lib/Makefile.targ
64 include $(SRC)/cmd/sgs/Makefile.targ
65
66 xlate.c: ../common/xlate.m4
67 $(M4) < ../common/xlate.m4 > xlate.c
68
69 xlate64.c: ../common/xlate64.m4
70 $(M4) < ../common/xlate64.m4 > xlate64.c
71
72
73 objs/msg.o \
74 pics/msg.o: msg.c
75
76 objs/error.o \
77 pics/error.o: msg.h
78
79 objs/ar.o \
80 pics/ar.o: msg.h
81
82 objs/xlate.o \
83 pics/xlate.o: xlate.c
84
85 # Special target for native builds (ie. when we need to build a version of ld
86 # to build a version of ld :-).
87
88 native: $(SGSLIBDIR)/$(LIBLINKS)
89
90 $(PICS): pics
91
92 $(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
93 $(BUILD.SO)
94 $(POST_PROCESS_SO)
95
96 $(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
97 -@$(RM) $(SGSLIBDIR)/$(LIBLINKS)
98 $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
99
100
101 # Derived source and header files (messaging). Make sure that the sgsmsg
102 # command is constructed - libelf might not be built with the whole sgs.
103
104 catalog: $(BLTMESG)
105
106 chkmsg: $(LIBSRCS)
107 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
108
109 $(BLTDEFS) + \
110 $(BLTDATA): $(SGSMSG) $(SGSMSGTARG)
111 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
112
113 $(BLTMESG): $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
114 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
115
116 $(SGSMSG): FRC
117 @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
118 @ pwd
119
120 FRC:
|
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) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2016 RackTop Systems.
24 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
25 #
26
27 objs/%.o \
28 pics/%.o: %.c
29 $(COMPILE.c) -o $@ $<
30 $(POST_PROCESS_O)
31
32 objs/%64.o \
33 pics/%64.o: $(SRCDIR)/common/%.c
34 $(COMPILE.c) -D_ELF64 -o $@ $<
35 $(POST_PROCESS_O)
36
37 objs/%.o \
38 pics/%.o: $(SRCDIR)/misc/%.c
39 $(COMPILE.c) -DELF -o $@ $<
40 $(POST_PROCESS_O)
41
42 objs/%.o \
43 pics/%.o: $(SRCDIR)/common/%.c
44 $(COMPILE.c) -o $@ $<
45 $(POST_PROCESS_O)
46
47 all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
48
49 delete:
50 $(RM) $(DYNLIB)
51
52 $(LIBLINKS):
53 $(RM) $(LIBLINKS)
54 $(SYMLINK) $(DYNLIB) $(LIBLINKS)
55
56 CLOBBERFILES += $(LIBLINKS)
57
58 # include common library targets
59 #
60 include $(SRC)/lib/Makefile.targ
61 include $(SRC)/cmd/sgs/Makefile.targ
62
63 xlate.c: $(SRCDIR)/common/xlate.m4
64 $(M4) < $(SRCDIR)/common/xlate.m4 > xlate.c
65
66 xlate64.c: $(SRCDIR)/common/xlate64.m4
67 $(M4) < $(SRCDIR)/common/xlate64.m4 > xlate64.c
68
69
70 objs/msg.o \
71 pics/msg.o: msg.c
72
73 objs/error.o \
74 pics/error.o: msg.h
75
76 objs/ar.o \
77 pics/ar.o: msg.h
78
79 objs/xlate.o \
80 pics/xlate.o: xlate.c
81
82 $(PICS): pics
83
84 # Derived source and header files (messaging). Make sure that the sgsmsg
85 # command is constructed - libelf might not be built with the whole sgs.
86
87 catalog: $(BLTMESG)
88
89 chkmsg: $(LIBSRCS)
90 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
91
92 $(BLTDEFS) + \
93 $(BLTDATA): $(SGSMSGTARG)
94 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
95
96 $(BLTMESG): $(SGSMSGALL) xlate.c xlate64.c
97 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
98
99 FRC:
|