1 ### Makefile for GNU binary-file utilities
8 version
=`$(srcdir)/../gcc$(subdir)/gcc -dumpversion`
10 bindir = $(prefix)/bin
11 libdir = $(prefix)/lib
12 libsubdir
= $(libdir)/gcc
/$(target
)/$(version
)
15 INSTALL_PROGRAM
= $(INSTALL
)
16 INSTALL_FILE
= $(INSTALL
)
18 ## Configuration options
19 # These should be all you need set before compiling
22 # these two should be the same program
26 # copy and strip should be the same program
30 # These should all be the same program too.
35 PROGS
= $(SIZE_PROG
) $(COPY_PROG
) $(OBJDUMP_PROG
) $(NM_PROG
) $(AR_PROG
) $(STRIP_PROG
) $(RANLIB_PROG
)
39 BASEDIR
= $(srcdir)/..
40 # Let rich do this for now:
41 LIBDIR
= $(srcdir)/..
/bfd
$(subdir
)
43 #__dgux__#DEFINES=-DHOST_SYS=DGUX_SYS
45 #__sun3__#DEFINES=-DHOST_SYS=SUN3_SYS
46 #__sun3__#LDFLAGS= -Bstatic
48 #__sun4__#DEFINES=-DHOST_SYS=SUN4_SYS
49 #__sun4__#LDFLAGS= -Bstatic
51 #__sun386i__#LDFLAGS = -Bstatic
53 #__rs6000__#DEFINES=-Daix
54 #__rs6000__#ALLOCA = alloca.o
56 #__i386v__#ALLOCA = alloca.o
57 #__i386v__#DEFINES=-DUSG
60 #### host and target dependant Makefile fragments come in here.
63 INCDIR
= $(BASEDIR
)/include-cygnus
65 CFLAGS
= -g
-I
$(INCDIR
) $(DEFINES
) $(CDEFINES
)
70 DISASMS
= m68k-pinsn.o i960-pinsn.o sparc-pinsn.o
73 # Hopefully all these may be flushed once we get configuration down pat.
75 # alloca only needed for systems which don't have it and when cc != gcc.
78 # nm tries to malloc enough space for the string table. The old GNU malloc
79 # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
80 # fail unnecessarily. I've also seen some Unix malloc's fail, even when
81 # there is enough memory. So use the new GNU malloc.
84 # Use the GNU getopt unless you have problems with it.
85 # The IRIS version could probably benefit from being assembled with
86 # libmalloc rather than the ordinary malloc.
87 GNU_GETOPT
= getopt.o
$(ALLOCA
)
88 GNU_GETOPT_LONG
= getopt1.o
$(GNU_GETOPT
)
93 # Code shared by all the binutils.
94 BULIBS
= bucomm.o version.o filemode.o
96 ADDL_LIBS
= $(GNU_GETOPT_LONG
) $(MALLOC
) $(BULIBS
)
98 BFD
= $(LIBDIR
)/libbfd.a
102 all: $(ADDL_LIBS
) $(PROGS
)
105 #$(BFD):$(LIBDIR)/../common/*.c
106 # (cd $(LIBDIR); make)
108 $(SIZE_PROG
): $(ADDL_LIBS
) size.o
$(BFD
)
109 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(SIZE_PROG
) size.o
$(ADDL_LIBS
) $(BFD
)
111 $(COPY_PROG
): $(ADDL_LIBS
) copy.o
$(BFD
)
112 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(COPY_PROG
) copy.o
$(ADDL_LIBS
) $(BFD
)
114 $(NM_PROG
): $(ADDL_LIBS
) nm.o
$(BFD
)
115 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(NM_PROG
) nm.o
$(MALLOC
) $(ADDL_LIBS
) $(BFD
)
117 $(OBJDUMP_PROG
): $(ADDL_LIBS
) size.o objdump.o
$(DISASMS
) $(BFD
)
118 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(OBJDUMP_PROG
) objdump.o
$(DISASMS
) $(ADDL_LIBS
) $(BFD
)
120 $(AR_PROG
): $(ADDL_LIBS
) ar.o
$(BFD
)
121 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(AR_PROG
) ar.o
$(MALLOC
) $(ADDL_LIBS
) $(BFD
)
123 $(RANLIB_PROG
): $(AR_PROG
)
124 -rm -f
$(RANLIB_PROG
)
125 -ln
$(AR_PROG
) $(RANLIB_PROG
)
127 $(STRIP_PROG
): $(COPY_PROG
)
129 -ln
$(COPY_PROG
) $(STRIP_PROG
)
132 -rm -f
*.o
*~ \
#* core $(PROGS) TAGS
137 etags
$(INCDIR
)/*.h
$(BFDSRC
)/*.
[hc
] *.
[hc
]
143 for i in
$(PROGS
) ; do \
144 $(INSTALL_PROGRAM
) $$i $(destdir
)/bin
/$$i ; \
152 m68k-pinsn.o
: m68k-pinsn.c
153 m68k-pinsn.o
: .
/m68k-opcode.h
154 i960-pinsn.o
: i960-pinsn.c
155 sparc-pinsn.o
: sparc-pinsn.c
156 sparc-pinsn.o
: .
/sparc-opcode.h
161 filemode.o
:filemode.c
162 #-----------------------------------------------------------------------------
163 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
165 # 'VERSION' file must be present and contain a string of the form "x.y"
166 #-----------------------------------------------------------------------------
170 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
173 # Dummy target to force execution of dependent targets.
178 # Target to uncomment host-specific lines in this makefile. Such lines must
179 # have the following string beginning in column 1: #__<hostname>__#
180 # Original Makefile is backed up as 'Makefile.old'.
182 # Invoke with: make make HOST=xxx
185 -@if
test $(HOST
)x
= x
; then \
186 echo
'\aSpecify "make make HOST=???"'; \
189 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
190 if
test $$?
= 0 ; then \
191 echo
"\aMakefile has already been processed with 'make make'";\
194 mv
-f Makefile Makefile.old
; \
195 echo
"#The next line was generated by 'make make'" >Makefile
; \
196 echo
"HOST=$(HOST)" >>Makefile
; \
198 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
202 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
204 .
/configure
+norecurse \
205 +destdir
=$(destdir
) \
206 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
207 $(host
) +target
=$(target
))
209 ### Local Variables: ***
210 ### mode:fundamental ***
211 ### page-delimiter: "^#\f" ***