Print this page
10051 cw(1) shouldn't have to translate -g
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/file/Makefile
+++ new/usr/src/cmd/file/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.
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 2007 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 PROG= file
27 27 XPG4PROG= file
28 28 MAGIC= magic
29 29
30 30 ELFCAP= $(SRC)/common/elfcap
31 31 SGSRTCID= $(SRC)/common/sgsrtcid
32 32
33 33 LOBJS= file.o elf_read32.o elf_read64.o magicutils.o
34 34 OBJS= $(LOBJS) elfcap.o
35 35 XPG4OBJS= $(OBJS:%.o=xpg4_%.o)
36 36 SRCS= file.c elf_read.c magicutils.c $(ELFCAP)/elfcap.c
37 37
38 38 include ../Makefile.cmd
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
39 39
40 40 CSTD= $(CSTD_GNU99)
41 41 C99LMODE= -Xc99=%all
42 42
43 43 CERRWARN += -_gcc=-Wno-uninitialized
44 44 CERRWARN += -_gcc=-Wno-type-limits
45 45
46 46 POFILE= file_all.po
47 47 POFILES= $(SRCS:%.c=%.po)
48 48
49 -# The debug binary can be built using the flag
50 -# -D COPTFLAG=-g CGLOBALSTATIC=
49 +# The debug binary can be built using the flags
50 +# SOURCEDEBUG=yes CGLOBALSTATIC=
51 51 # This will avoid the multiple symbols definition error
52 52 # for static global variables in elf_read32.o and elf_read64.o
53 53
54 54 LDLIBS += -lelf
55 55 CPPFLAGS += -I$(ELFCAP) -I$(SGSRTCID)
56 56 $(XPG4) := CFLAGS += -DXPG4
57 57
58 58 ROOTETCMAGIC= $(MAGIC:%=$(ROOTETC)/%)
59 59
60 60 $(ROOTETCMAGIC) := FILEMODE = $(LIBFILEMODE)
61 61
62 62 .PARALLEL: $(OBJS) $(XPG4OBJS) $(POFILES)
63 63
64 64 .KEEP_STATE:
65 65
66 66 all: $(PROG) $(XPG4) $(MAGIC)
67 67
68 68 $(PROG) : $(OBJS)
69 69 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
70 70 $(POST_PROCESS)
71 71
72 72 $(XPG4) : $(XPG4OBJS)
73 73 $(LINK.c) $(XPG4OBJS) -o $@ $(LDLIBS)
74 74 $(POST_PROCESS)
75 75
76 76 %.o: %.c
77 77 $(COMPILE.c) -o $@ $<
78 78
79 79 %32.o: %.c
80 80 $(COMPILE.c) -o $@ $<
81 81
82 82 %64.o: %.c
83 83 $(COMPILE.c) -D_ELF64 -o $@ $<
84 84
85 85 xpg4_%.o: %.c
86 86 $(COMPILE.c) -o $@ $<
87 87
88 88 xpg4_%32.o: %.c
89 89 $(COMPILE.c) -o $@ $<
90 90
91 91 xpg4_%64.o: %.c
92 92 $(COMPILE.c) -D_ELF64 -o $@ $<
93 93
94 94 elfcap.o: $(ELFCAP)/elfcap.c
95 95 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
96 96
97 97 xpg4_elfcap.o: $(ELFCAP)/elfcap.c
98 98 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
99 99
100 100 $(POFILE): $(POFILES)
101 101 $(RM) $@
102 102 cat $(POFILES) > $@
103 103
104 104 install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTETCMAGIC)
105 105
106 106 clean:
107 107 $(RM) $(OBJS) $(XPG4OBJS)
108 108
109 109 lint: lint_SRCS
110 110
111 111 include ../Makefile.targ
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX