1 ### Makefile for GNU binary-file utilities
5 ## Configuration options
6 # These should be all you need set before compiling
8 # these two should be the same program
12 # copy and strip should be the same program
16 # These should all be the same program too.
21 PROGS
= $(SIZE
) $(COPY
) $(OBJDUMP
) $(NM
) $(AR
) $(STRIP
) $(RANLIB
)
24 BASEDIR
= $(srcdir)/..
/..
26 # Let rich do this for now:
27 LIBDIR
= $(BASEDIR
)/bfd
/$(HOST
)
29 #__sun3__#DEFINES=-DHOST_SYS=SUN3_SYS
30 #__sun3__#LDFLAGS = -Bstatic
32 #__sun4__#DEFINES=-DHOST_SYS=SUN4_SYS
33 #__sun4__#LDFLAGS = -Bstatic
35 #__sun386i__#LDFLAGS = -Bstatic
37 #__rs6000__#DEFINES=-Daix
38 #__rs6000__#ALLOCA = alloca.o
40 #__i386v__#ALLOCA = alloca.o
41 #__i386v__#DEFINES=-DUSG
43 INCDIR
= $(BASEDIR
)/include-cygnus
45 CFLAGS
= -g
-I
$(INCDIR
) $(DEFINES
)
50 DISASMS
= m68k-pinsn.o i960-pinsn.o sparc-pinsn.o
53 # Hopefully all these may be flushed once we get configuration down pat.
55 # alloca only needed for systems which don't have it and when cc != gcc.
58 # nm tries to malloc enough space for the string table. The old GNU malloc
59 # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
60 # fail unnecessarily. I've also seen some Unix malloc's fail, even when
61 # there is enough memory. So use the new GNU malloc.
64 # Use the GNU getopt unless you have problems with it.
65 # The IRIS version could probably benefit from being assembled with
66 # libmalloc rather than the ordinary malloc.
67 GNU_GETOPT
= getopt.o
$(ALLOCA
)
68 GNU_GETOPT_LONG
= getopt1.o
$(GNU_GETOPT
)
70 # This is supposed to become part of the standard GNU libs, whatever
76 # Code shared by all the binutils.
77 BULIBS
= bucomm.o version.o
79 ADDL_LIBS
= $(GNU_GETOPT_LONG
) $(MALLOC
) $(FILEMODE
) $(BULIBS
)
81 BFD
= $(LIBDIR
)/libbfd.a
85 all: $(ADDL_LIBS
) $(PROGS
)
87 $(SIZE
): $(ADDL_LIBS
) size.o
$(BFD
)
88 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(SIZE
) size.o
$(ADDL_LIBS
) $(BFD
)
90 $(COPY
): $(ADDL_LIBS
) copy.o
$(BFD
)
91 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(COPY
) copy.o
$(ADDL_LIBS
) $(BFD
)
93 $(NM
): $(ADDL_LIBS
) nm.o
$(BFD
)
94 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(NM
) nm.o
$(MALLOC
) $(ADDL_LIBS
) $(BFD
)
96 $(OBJDUMP
): $(ADDL_LIBS
) size.o objdump.o
$(DISASMS
) $(BFD
)
97 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(OBJDUMP
) objdump.o
$(DISASMS
) $(ADDL_LIBS
) $(BFD
)
99 $(AR
): $(ADDL_LIBS
) ar.o
$(BFD
)
100 $(CC
) $(LDFLAGS
) $(CFLAGS
) -o
$(AR
) ar.o
$(MALLOC
) $(ADDL_LIBS
) $(BFD
)
111 -rm -f
*.o
*~ \
#* core $(PROGS) TAGS
116 etags
$(INCDIR
)/*.h
$(BFDSRC
)/*.
[hc
] *.
[hc
]
122 for prog in
$(PROGS
); do \
123 rm -f
$G960BASE/bin
/$$prog-new
; cp
$$prog $$G960BASE/bin
/$$prog-new
; \
132 m68k-pinsn.o
: m68k-pinsn.c
133 m68k-pinsn.o
: .
/m68k-opcode.h
134 i960-pinsn.o
: i960-pinsn.c
135 sparc-pinsn.o
: sparc-pinsn.c
136 sparc-pinsn.o
: .
/sparc-opcode.h
142 #-----------------------------------------------------------------------------
143 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
145 # 'VERSION' file must be present and contain a string of the form "x.y"
146 #-----------------------------------------------------------------------------
150 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
153 # Dummy target to force execution of dependent targets.
158 # Target to uncomment host-specific lines in this makefile. Such lines must
159 # have the following string beginning in column 1: #__<hostname>__#
160 # Original Makefile is backed up as 'Makefile.old'.
162 # Invoke with: make make HOST=xxx
165 -@if
test $(HOST
)x
= x
; then \
166 echo
'\aSpecify "make make HOST=???"'; \
169 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
170 if
test $$?
= 0 ; then \
171 echo
"\aMakefile has already been processed with 'make make'";\
174 mv
-f Makefile Makefile.old
; \
175 echo
"#The next line was generated by 'make make'" >Makefile
; \
176 echo
"HOST=$(HOST)" >>Makefile
; \
178 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
182 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
183 (cd
$(srcdir) ; .
/configure
-host
=$(host
) $(target
))
185 ### Local Variables: ***
186 ### mode:fundamental ***
187 ### page-delimiter: "^#\f" ***