1 # Makefile template for Configure for the opcodes library.
2 # Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
3 # Written by Cygnus Support.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 exec_prefix = $(prefix)
24 bindir = $(exec_prefix)/bin
25 libdir = $(exec_prefix)/lib
27 datadir = $(prefix)/lib
28 mandir = $(prefix)/man
29 man1dir = $(mandir)/man1
30 man2dir = $(mandir)/man2
31 man3dir = $(mandir)/man3
32 man4dir = $(mandir)/man4
33 man5dir = $(mandir)/man5
34 man6dir = $(mandir)/man6
35 man7dir = $(mandir)/man7
36 man8dir = $(mandir)/man8
37 man9dir = $(mandir)/man9
38 infodir = $(prefix)/info
39 includedir = $(prefix)/include
41 docdir
= $(srcdir)/doc
46 INSTALL_PROGRAM
= $(INSTALL
)
47 INSTALL_DATA
= $(INSTALL
)
56 INCDIR
= $(srcdir)/..
/include
57 CSEARCH
= -I.
-I
$(srcdir) -I
$(INCDIR
)
61 TARGETLIB
= libopcodes.a
66 OFILES
= $(DIS_LIBS
) sparc-opc.o
67 #### host and target dependent Makefile fragments come in here.
71 "against=$(against)" \
73 "AR_FLAGS=$(AR_FLAGS)" \
77 "MAKEINFO=$(MAKEINFO)" \
78 "INSTALL=$(INSTALL)" \
79 "INSTALL_DATA=$(INSTALL_DATA)" \
80 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
84 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
87 # C source files that correspond to .o's.
90 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
103 # HDEPFILES comes from the host config; TDEPFILES from the target config.
106 $(TARGETLIB
): $(OFILES
)
108 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
109 $(RANLIB
) $(TARGETLIB
)
114 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
117 rm -f
*.
[oa
] *~ core
*.E
*.p
*.ip aout-params.h gen-aout
119 clobber realclean: clean
122 # Mark everything as depending on config.status, since the timestamp on
123 # sysdep.h might actually move backwards if we reconfig and relink it
124 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
125 RECONFIG
= config.status
129 # This target should be invoked before building a new release.
130 # 'VERSION' file must be present and contain a string of the form "x.y"
134 MAJ
=`sed 's/\..*//' VERSION` ; \
135 MIN
=`sed 's/.*\.//' VERSION` ; \
136 V
=$$MAJ.
`expr $$MIN + 1` ; \
138 echo
$$V >VERSION
; \
141 # Dummy target to force execution of dependent targets.
146 -parent
=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
147 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
148 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; fi
149 $(INSTALL_DATA
) $(TARGET_LIB
) $(libdir)/libopcodes.a
150 $(RANLIB
) $(libdir)/libopcodes.a
152 # -parent=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
153 # if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
154 # -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
155 # $(INSTALL_DATA) $(INCDIR)/bfd.h $(includedir)/bfd.h
156 # -if [ -z "$(oldincludedir)" ] ; then true ; else if [ -d $(oldincludedir) ] ; then true ; else mkdir $(oldincludedir) ; fi ; $(INSTALL_DATA) $(INCDIR)/bfd.h $(oldincludedir)/bfd.h ; fi
157 # @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
159 # Target to uncomment host-specific lines in this makefile. Such lines must
160 # have the following string beginning in column 1: #__<hostname>__#
161 # Original Makefile is backed up as 'Makefile.old'.
163 # Invoke with: make make HOST=xxx
166 -@if
test $(HOST
)x
= x
; then \
167 echo
'\aSpecify "make make HOST=???"'; \
170 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
171 if
test $$?
= 0 ; then \
172 echo
"\aMakefile has already been processed with 'make make'";\
175 mv
-f Makefile Makefile.old
; \
176 echo
"#The next line was generated by 'make make'" >Makefile
; \
177 echo
"HOST=$(HOST)" >>Makefile
; \
179 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
181 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
182 $(SHELL
) .
/config.status
188 # What appears below is generated by a hacked mkdep using gcc -MM.
190 # DO NOT DELETE THIS LINE -- mkdep uses it.
191 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
194 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY