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
)
37 BASEDIR
= $(srcdir)/..
38 LIBDIR
= $(srcdir)/..
/bfd
$(subdir
)
40 #### host and target dependant Makefile fragments come in here.
43 INCDIR
= $(BASEDIR
)/include
45 CFLAGS
= -g
-I
$(srcdir)/..
/include -I
$(INCDIR
) $(HDEFINES
) $(TDEFINES
)
47 DISASMS
= m68k-pinsn.o i960-pinsn.o sparc-pinsn.o
51 # Hopefully all these may be flushed once we get configuration down pat.
53 # alloca only needed for systems which don't have it and when cc != gcc.
56 # nm tries to malloc enough space for the string table. The old GNU malloc
57 # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
58 # fail unnecessarily. I've also seen some Unix malloc's fail, even when
59 # there is enough memory. So use the new GNU malloc.
62 # Use the GNU getopt unless you have problems with it.
63 # The IRIS version could probably benefit from being assembled with
64 # libmalloc rather than the ordinary malloc.
65 LIBIBERTY
= $(srcdir)/..
/libiberty
$(subdir
)/libiberty.a
67 # Code shared by all the binutils.
68 BULIBS
= bucomm.o version.o filemode.o
70 ADDL_LIBS
= $(MALLOC
) $(BULIBS
) $(BFD
) $(LIBIBERTY
)
72 BFD
= $(LIBDIR
)/libbfd.a
76 all: $(ADDL_LIBS
) $(PROGS
)
79 #$(BFD):$(LIBDIR)/../common/*.c
80 # (cd $(LIBDIR); make)
82 $(SIZE_PROG
): $(ADDL_LIBS
) size.o
$(BFD
)
83 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(SIZE_PROG
) size.o
$(ADDL_LIBS
) $(LOADLIBES
)
85 $(COPY_PROG
): $(ADDL_LIBS
) copy.o
$(BFD
)
86 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(COPY_PROG
) copy.o
$(ADDL_LIBS
) $(LOADLIBES
)
88 $(NM_PROG
): $(ADDL_LIBS
) nm.o
$(BFD
)
89 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(NM_PROG
) nm.o
$(ADDL_LIBS
) $(LOADLIBES
)
91 $(OBJDUMP_PROG
): $(ADDL_LIBS
) size.o objdump.o
$(DISASMS
) $(BFD
)
92 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(OBJDUMP_PROG
) objdump.o
$(DISASMS
) $(ADDL_LIBS
) $(LOADLIBES
)
94 $(AR_PROG
): $(ADDL_LIBS
) ar.o
$(BFD
)
95 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(AR_PROG
) ar.o
$(ADDL_LIBS
) $(LOADLIBES
)
97 $(RANLIB_PROG
): $(AR_PROG
)
99 -ln
$(AR_PROG
) $(RANLIB_PROG
)
101 $(STRIP_PROG
): $(COPY_PROG
)
103 -ln
$(COPY_PROG
) $(STRIP_PROG
)
107 - mv
-f
*.o
$(PROGS
) stage1
111 - mv
-f
*.o
$(PROGS
) stage2
115 - mv
-f
*.o
$(PROGS
) stage3
118 - (cd stage1
; mv
-f
* ..
)
122 - (cd stage2
; mv
-f
* ..
)
126 - (cd stage3
; mv
-f
* ..
)
130 -rm -f
*.o
*~ \
#* core $(PROGS) TAGS
135 etags
$(INCDIR
)/*.h
$(BFDSRC
)/*.
[hc
] *.
[hc
]
141 for i in
$(PROGS
) ; do \
142 $(INSTALL_PROGRAM
) $$i $(destdir
)/bin
/$$i ; \
150 m68k-pinsn.o
: m68k-pinsn.c
151 m68k-pinsn.o
: .
/m68k-opcode.h
152 i960-pinsn.o
: i960-pinsn.c
153 sparc-pinsn.o
: sparc-pinsn.c
154 sparc-pinsn.o
: .
/sparc-opcode.h
159 filemode.o
:filemode.c
160 #-----------------------------------------------------------------------------
161 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
163 # 'VERSION' file must be present and contain a string of the form "x.y"
164 #-----------------------------------------------------------------------------
168 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
171 # Dummy target to force execution of dependent targets.
175 # Target to uncomment host-specific lines in this makefile. Such lines must
176 # have the following string beginning in column 1: #__<hostname>__#
177 # Original Makefile is backed up as 'Makefile.old'.
179 # Invoke with: make make HOST=xxx
182 -@if
test $(HOST
)x
= x
; then \
183 echo
'\aSpecify "make make HOST=???"'; \
186 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
187 if
test $$?
= 0 ; then \
188 echo
"\aMakefile has already been processed with 'make make'";\
191 mv
-f Makefile Makefile.old
; \
192 echo
"#The next line was generated by 'make make'" >Makefile
; \
193 echo
"HOST=$(HOST)" >>Makefile
; \
195 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
199 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
201 .
/configure
+norecurse \
202 +destdir
=$(destdir
) \
203 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
204 $(host
) +target
=$(target
))
206 ### Local Variables: ***
207 ### mode:fundamental ***
208 ### page-delimiter: "^#\f" ***