# Makefile for GNU C++ compiler. # Copyright (C) 1987, 1988 Free Software Foundation, Inc. # Hacked by Michael Tiemann (tiemann@mcc.com) #This file is part of GNU CC. #GNU CC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 1, or (at your option) #any later version. #GNU CC is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License #along with GNU CC; see the file COPYING. If not, write to #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # Variables that exist for you to override. # See below for how to change them for certain systems. CFLAGS = -g -DSOS -DESKIT -O CFLAGS = /define=("SOS", "ESKIT")/cc1_opt="-mpcc-alignment" CFLAGS = /cc1_opt="-mpcc-alignment" # CFLAGS = -g -O CC = gcc BISON = bison BISONFLAGS = /verbose/define AR = ar SHELL = /bin/sh # on sysV, define this as cp. INSTALL = install -c # Compiler to use for compiling gnulib. # OLDCC should not be the GNU C compiler. OLDCC = cc # CFLAGS for use with OLDCC, for compiling gnulib. # NOTE: -O does not work on some Unix systems! # If you use it here, you are asking for trouble. CCLIBFLAGS= prefix = # Directory where sources are, from where we are. srcdir = . # Directory in which to put the executable for the command `g++' bindir = $(prefix)/usr/local/bin # Directory in which to put the subprograms used by the compiler. libdir = $(prefix)/usr/local/lib # Directory in which to put the crt0+.o, crt1+.o, and other such files. startdir = $(prefix)/usr/local/lib # Directory in which to put man pages. mandir = $(prefix)/usr/local/man/man1 # Number to put in man-page filename. manext = 1 # Additional system libraries to link with. CLIB= ,gnu_cc:[000000]gcclib/libr,sys$$share:vaxcrtl/opt # Change this to a null string if obstacks are installed in the # system library. OBSTACK=obstack.obj # Directory to link to, when using the target `maketest'. DIR = ../gcc # this is the GNU CC build directory TDIR = ../gcc-test # End of variables for you to override. # Variables you should change for certain systems. # These are what you would need on HPUX: # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 # If you are using the GNU assembler and linker on HPUX, # add -I../hp-include to CFLAGS. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5 # bites whenever tree.def, rtl.def or machmode.def is included # (ie., on every source file). # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 # For CCLIBFLAGS you might want to specify the switch that # forces only 68000 instructions to be used. # If you are making gcc for the first time, and if you are compiling it with # a non-gcc compiler, and if your system doesn't have a working alloca() in any # of the standard libraries (as is true for HP/UX or Genix), # then get alloca.c from GNU Emacs and un-comment the following line: # ALLOCA = alloca.o # But don't do that if compiling using GCC. # If your system has alloca() in /lib/libPW.a, un-comment the following line: # CLIB= -lPW # If your system's malloc() routine fails for any reason (as it does on # certain versions of Genix), try getting the files # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line: #MALLOC = malloc.o # If you are running GCC on an Apollo (SR10.x), # go into a Berkeley environment and use this: # CFLAGS = -g -A nansi -A cpu,3000 -A runtype,bsd4.3 -A systype,any -DSHORT_ENUM_BUG # (Says vasta@apollo.com.) # Dependency on obstack, alloca, malloc or whatever library facilities # are not installed in the system libraries. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) # How to link with both our special library facilities # and the system's installed libraries. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB) # Always use -I$(srcdir)/config when compiling. .c.obj: $(CC) $(CFLAGS) $(CPPFLAGS) /inc=([],[.config]) $< # Language-specific object files for C. C_OBJS = c-parse_tab.obj c-decl.obj c-typeck.obj c-convert.obj # Language-specific object files for C++. CPLUS_OBJS = cplus-tab.obj cplus-decl.obj cplus-decl2.obj cplus-typeck.obj cplus-typeck2.obj cplus-tree.obj \ cplus-lex.obj cplus-class.obj cplus-init.obj cplus-except.obj\ cplus-method.obj cplus-cvt.obj cplus-search.obj cplus-ptree.obj # Language-independent object files. OBJS = toplev.obj version.obj tree.obj print-tree.obj stor-layout.obj fold-const.obj \ rtl.obj rtlanal.obj expr.obj stmt.obj expmed.obj explow.obj optabs.obj varasm.obj \ symout.obj dbxout.obj sdbout.obj emit-rtl.obj insn-emit.obj \ integrate.obj jump.obj cse.obj loop.obj flow.obj stupid.obj combine.obj \ regclass.obj local-alloc.obj global-alloc.obj reload.obj reload1.obj caller-save.obj \ insn-peep.obj final.obj recog.obj insn-recog.obj insn-extract.obj insn-output.obj # Files to be copied away after each stage in building. STAGE_GCC=gcc STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \ cc1plus g++ ld++ # Header files that are made available to programs compiled with gcc. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h float.h # If you want to recompile everything, just do rm *.o. # CONFIG_H = config.h tm.h CONFIG_H = RTL_H = rtl.h rtl.def machmode.def TREE_H = tree.h real.h tree.def machmode.def CPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h # gnulib is not a target because a proper installation of GNU CC # will place it where g++ can find it. Same with cpp #all: g++ ld++ crt0+.o crt1+.o cc1plus # collect all: cc1plus.exe doc: cpp.info g++.info compilations: ${OBJS} ${CPLUS_OBJS} gxx.exe: gcc.obj $(LIBDEPS) version.obj $(CC) $(CFLAGS) $(LDFLAGS) -o g++ gcc.o version.o $(LIBS) # Note: If you have SunOS 4.0, you can't use GNU LD to link programs # which use shared libraries. You could add -DNO_GNU_LD to this # command line, but be warned that collect is not really powerful # enough to do right by all C++ static constructors, and it would # be better if you could just add support to GNU LD to handle # shared libraries. gcc.o: gcc.c $(CONFIG_H) $(CC) $(CFLAGS) -I$(srcdir) -I$(srcdir)/config \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c $< newld.o: newld.c -if cmp -s tm.h config/tm-sun3+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sun3-fpa+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sun3-nfp+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sun2+.h; then \ OPTS='-Dmc68010 -DSUN2=2 -DTARGET=SUN2'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sun4os3+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sun4os4+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-sparc+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-encore.h; then \ CRT0_OPTIONS='-DUMAX'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-hp9k320g+.h; then \ OPTS='-Dmc68020 -DNON_NATIVE -DUSG' \ DFLTS='"$(libdir)/gnu", "/lib", "/usr/lib", "/usr/local/lib"'; \ elif cmp -s tm.h config/tm-altos3068.h; then \ OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \ elif cmp -s tm.h tm-i386gas+.h; then \ OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \ else \ OPTS='-DTARGET=-1'; \ DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \ fi; \ echo $$OPTS $$DFLTS; \ if [ "$$DFLTS" = "" ] ; \ then \ $(CC) -c -v $$OPTS $(PROFILE) $(CFLAGS) $(CFLAGS) newld.c ; \ else \ $(CC) -c -v $$OPTS -DSTANDARD_SEARCH_DIRS="$$DFLTS" $(PROFILE) $(CFLAGS) $(CFLAGS) newld.c ; \ fi ld.o: ld.c -if cmp -s tm.h config/tm-sun3+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ elif cmp -s tm.h config/tm-sun3-fpa+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ elif cmp -s tm.h config/tm-sun3-nfp+.h; then \ OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \ elif cmp -s tm.h config/tm-sun2+.h; then \ OPTS='-Dmc68010 -DSUN2=2 -DTARGET=SUN2'; \ elif cmp -s tm.h config/tm-sun4os3+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ elif cmp -s tm.h config/tm-sun4os4+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ elif cmp -s tm.h config/tm-sparc+.h; then \ OPTS='-DSUN4=4 -DTARGET=SUN4'; \ elif cmp -s tm.h config/tm-encore.h; then \ CRT0_OPTIONS='-DUMAX'; \ elif cmp -s tm.h config/tm-altos3068.h; then \ OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \ elif cmp -s tm.h tm-i386gas+.h; then \ OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \ else \ OPTS='-DTARGET=-1'; \ fi; \ echo $$OPTS; \ $(CC) -c $$OPTS $(PROFILE) $(CFLAGS) -DDEFAULT_SEARCH_PREFIX=\"$(libdir)\" ld.c # if newld.c does not work as well as ld.c does for you, # then change `newld' to `ld'. ld++: newld.o $(CC) -o ld++ $(PROFILE) newld.o -lg -lc collect: collect.c config.h $(LIBDEPS) COLLECT_LIBS="-lld"; \ if cmp -s tm.h config/tm-encore.h; then \ COLLECT_OPTIONS='-DUMAX'; \ else \ COLLECT_OPTIONS=''; \ fi; \ $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) -I$(srcdir)/config $< -lg -lc $$COLLECT_LIBS crt0+.o: crt0.c config.h -if cmp -s tm.h config/tm-vax.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES='; \ elif cmp -s tm.h config/tm-vaxv.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES='; \ elif cmp -s tm.h config/tm-vms.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES='; \ elif cmp -s tm.h config/tm-hp9k320.h; then \ CRT0_OPTIONS='-Umc68000'; \ elif cmp -s tm.h config/tm-hp9k320g.h; then \ CRT0_OPTIONS='-Umc68000'; \ elif cmp -s tm.h config/tm-sequent.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES= -DDOT_GLOBAL_START'; \ elif cmp -s tm.h config/tm-altos3068.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES= -Umc68000 -Um68k'; \ elif cmp -s tm.h tm-i386gas+.h; then \ CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \ else \ CRT0_OPTIONS=''; \ fi; \ echo $$CRT0_OPTIONS; \ $(CC) -Um68k $$CRT0_OPTIONS $(CFLAGS) -c -I$(srcdir) -I$(srcdir)/config crt0.c mv crt0.o crt0+.o CRT1_COMMAND=$(CC) -Um68k -g -c -I$(srcdir) -I$(srcdir)/config crt1.c #crt1+.o: crt1.c config.h # $(CRT1_COMMAND) # mv crt1.o crt1+.o #LDFLAGS = -X cc1plus.exe: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) # $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS) $$ @make-cc1plus.com link # ld++ -C $(LDFLAGS) -o cc1plus crt0+.o $(CPLUS_OBJS) $(OBJS) \ # unex-addr.o unexec.o lastfile.o $(libdir)/gcc-gnulib $(LIBS) -lc cplus-decl.obj : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cplus-parse.h cplus-typeck.obj : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cplus-tree.obj : cplus-tree.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-class.obj : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-init.obj : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-method.obj : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-cvt.obj : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-search.obj : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-ptree.obj : cplus-ptree.c $(CONFIG_H) $(TREE_H) new-cplus-method.obj : new-cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-tab.obj : cplus-tab.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-tab.h flags.h $(CC) $(CFLAGS) /inc=([],[.config]) /def=("PARSE_OUTPUT"="""cplus-parse.output""") cplus-tab.c cplus-tab.c : cplus-parse.y @write sys$$output "expect 24 shift/reduce conflicts and 12 reduce/reduce conflicts" $(BISON) /out=cplus-tab.c $(BISONFLAGS) cplus-parse.y cplus-lex.obj : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-tab.h unexec.obj : unexec.c lastfile.obj : lastfile.c unex-addr.obj : unex-addr.c # Language-independent files. tree.obj : tree.c $(CONFIG_H) $(TREE_H) flags.h $(CPLUS_TREE_H) print-tree.obj : print-tree.c $(CONFIG_H) $(TREE_H) stor-layout.obj : stor-layout.c $(CONFIG_H) $(TREE_H) $(CPLUS_TREE_H) fold-const.obj : fold-const.c $(CONFIG_H) $(TREE_H) toplev.obj : toplev.c $(CONFIG_H) $(TREE_H) flags.h rtl.obj : rtl.c $(CONFIG_H) $(RTL_H) rtlanal.obj : rtlanal.c $(CONFIG_H) $(RTL_H) varasm.obj : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h \ insn-codes.h hard-reg-set.h stmt.obj : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ insn-flags.h expr.h insn-config.h regs.h hard-reg-set.h insn-codes.h expr.obj : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ insn-flags.h insn-codes.h expr.h insn-config.h recog.h $(CPLUS_TREE_H) expmed.obj : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ insn-flags.h insn-codes.h expr.h insn-config.h recog.h explow.obj : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h optabs.obj : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ insn-flags.h insn-codes.h expr.h insn-config.h recog.h symout.obj : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h dbxout.obj : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h $(CPLUS_TREE_H) sdbout.obj : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) emit-rtl.obj : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h real.h integrate.obj : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \ insn-flags.h insn-codes.h jump.obj : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h stupid.obj : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h cse.obj : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h loop.obj : loop.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \ regs.h hard-reg-set.h recog.h flags.h expr.h flow.obj : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h combine.obj : combine.c $(CONFIG_H) $(RTL_H) flags.h \ insn-config.h regs.h basic-block.h recog.h regclass.obj : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \ insn-config.h recog.h hard-reg-set.h local-alloc.obj : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \ insn-config.h recog.h hard-reg-set.h global-alloc.obj : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \ basic-block.h regs.h hard-reg-set.h insn-config.h reload.obj : reload.c $(CONFIG_H) $(RTL_H) \ reload.h recog.h hard-reg-set.h insn-config.h regs.h reload1.obj : reload1.c $(CONFIG_H) $(RTL_H) flags.h \ reload.h regs.h hard-reg-set.h insn-config.h basic-block.h caller-save.obj : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \ reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h final.obj : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h \ insn-config.h real.h output.h recog.obj : recog.c $(CONFIG_H) $(RTL_H) \ regs.h recog.h hard-reg-set.h insn-config.h # Normally this target is not used; but it is used if you # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c # from the GNU Emacs distribution. # Note some machines won't allow $(CC) without -S on this source file. alloca.o: alloca.c $(CC) $(CFLAGS) -S alloca.c as alloca.s -o alloca.o # Now the source files that are generated from the machine description. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \ insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c # The following pair of rules has this effect: # genconfig is run only if the md has changed since genconfig was last run; # but the file insn-config.h is touched only when its contents actually change. # Each of the other insn-* files is handled by a similar pair of rules. insn-config.h: stamp-config.h stamp-config.h : md genconfig.exe $$ @do genconfig md insn-config.h $$ @touch stamp-config.h insn-flags.h: stamp-flags.h stamp-flags.h : md genflags.exe $$ @do genflags md insn-flags.h $$ @touch stamp-flags.h insn-codes.h: stamp-codes.h stamp-codes.h : md gencodes.exe $$ @do gencodes md insn-codes.h $$ @touch stamp-codes.h insn-emit.obj : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h insn-codes.h \ insn-config.h insn-flags.h $(CC) $(CFLAGS) /inc=([],[.config]) insn-emit.c insn-emit.c: stamp-emit.c stamp-emit.c : md genemit.exe $$ @do genemit md insn-emit.c $$ @touch stamp-emit.c insn-recog.obj : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h real.h $(CC) $(CFLAGS) /inc=([],[.config]) insn-recog.c insn-recog.c: stamp-recog.c stamp-recog.c : md genrecog.exe $$ @do genrecog md insn-recog.c $$ @touch stamp-recog.c insn-extract.obj : insn-extract.c $(RTL_H) $(CC) $(CFLAGS) /inc=([],[.config]) insn-extract.c insn-extract.c: stamp-extract.c stamp-extract.c : md genextract.exe $$ @do genextract md insn-extract.c $$ @touch stamp-extract.c insn-peep.obj : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h $(CC) $(CFLAGS) /inc=([],[.config]) insn-peep.c insn-peep.c: stamp-peep.c stamp-peep.c : md genpeep.exe $$ @do genpeep md insn-peep.c $$ @touch stamp-peep.c insn-output.obj : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \ hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c $(CC) $(CFLAGS) /inc=([],[.config]) insn-output.c insn-output.c: stamp-output.c stamp-output.c : md genoutput.exe $$ @do genoutput md insn-output.c $$ @touch stamp-output.c # Now the programs that generate those files. genconfig.exe : genconfig.obj rtl.obj $(LIBDEPS) link/exe=$@ genconfig,rtl,$(LIBS) genconfig.obj : genconfig.c $(RTL_H) genflags.exe : genflags.obj rtl.obj $(LIBDEPS) link/exe=$@ genflags,rtl,$(LIBS) genflags.obj : genflags.c $(RTL_H) gencodes.exe : gencodes.obj rtl.obj $(LIBDEPS) link/exe=$@ gencodes,rtl,$(LIBS) gencodes.obj : gencodes.c $(RTL_H) genemit.exe : genemit.obj rtl.obj $(LIBDEPS) link/exe=$@ genemit,rtl,$(LIBS) genemit.obj : genemit.c $(RTL_H) genrecog.exe : genrecog.obj rtl.obj $(LIBDEPS) link/exe=$@ genrecog,rtl,$(LIBS) genrecog.obj : genrecog.c $(RTL_H) genextract.exe : genextract.obj rtl.obj $(LIBDEPS) link/exe=$@ genextract,rtl,$(LIBS) genextract.obj : genextract.c $(RTL_H) genpeep.exe : genpeep.obj rtl.obj $(LIBDEPS) link/exe=$@ genpeep,rtl,$(LIBS) genpeep.obj : genpeep.c $(RTL_H) genoutput.exe : genoutput.obj rtl.obj $(LIBDEPS) link/exe=$@ genoutput,rtl,$(LIBS) genoutput.obj : genoutput.c $(RTL_H) # Making the preprocessor cpp: cccp -rm -f cpp ln cccp cpp cccp: cccp.o cexp.o version.o $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS) cexp.o: cexp.c cexp.c: cexp.y $(BISON) $< mv cexp.tab.c cexp.c cccp.o: cccp.c $(CC) $(CFLAGS) -I$(srcdir) -I$(srcdir)/config \ -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c $< cpp.info: cpp.texinfo makeinfo $< #g++.info: g++.texinfo # makeinfo $< # gnulib is not deleted because deleting it would be inconvenient # for most uses of this target. clean: -rm -f $(STAGESTUFF) $(STAGE_GCC) -rm -f stamp-*.[ch] tmp-insn-* -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop -rm -f core float.h hard-params # Like clean but also delete the links made to configure gcc. # Also removes gnulib, since that is desirable if you are changing cpus. cleanconfig: clean -rm -f tm.h aux-output.c config.h md config.status gnulib stamp-gnulib2 # Get rid of every file that's generated from some other file (except INSTALL). realclean: cleanconfig -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs -rm -f cplus-tab.c cplus-parse.output cplus-tab.h -rm -f errs gnulib cexp.c TAGS tm-*+.h -rm -f g++.info* g++.?? g++.??s g++.log g++.toc g++.*aux -rm -f *.dvi # Copy the files into directories where they will be run. install: all -mkdir $(libdir) -mkdir $(bindir) -mkdir $(startdir) -if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(libdir)/gcc-cc1plus ;fi $(INSTALL) g++ $(bindir) -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld++ ;fi -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi -mkdir $(libdir)/g++-include -chmod ugo+rx $(libdir)/g++-include # do make -f Makefile maketest DIR=../gcc TDIR=../gcc-test # in the intended test directory to make it a suitable test directory. maketest: -rm -f =* -ln -s $(DIR)/.gdbinit . -ln -s $(DIR)/bison.simple . -ln -s $(DIR)/config.gcc . -ln -s $(DIR)/move-if-change . $(MAKE) clean ./make-links.g++ -ln -s $(DIR)/gen*.c . -ln -s $(TDIR)/obstack.o $(TDIR)/rtl.o $(TDIR)/emit-rtl.o \ $(TDIR)/insn-*.? $(TDIR)/jump.o $(TDIR)/cse.o \ $(TDIR)/loop.o $(TDIR)/flow.o $(TDIR)/stupid.o $(TDIR)/combine.o \ $(TDIR)/regclass.o $(TDIR)/local-alloc.o $(TDIR)/global-alloc.o \ $(TDIR)/reload.o $(TDIR)/reload1.o $(TDIR)/caller-save.o \ $(TDIR)/final.o $(TDIR)/recog.o $(TDIR)/gen*.o $(TDIR)/genemit \ $(TDIR)/genoutput $(TDIR)/genrecog $(TDIR)/genextract \ $(TDIR)/genflags $(TDIR)/gencodes $(TDIR)/genconfig \ $(TDIR)/genpeep . -rm tm.h aux-output.c config.h md # You must then run config.g++ to set up for compilation. bootstrap: all force echo GNU C++ does not bootstrap itself .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists. force: TAGS: force mkdir temp -mv cplus-tab.c cexp.c c-*.c temp etags *.y *.h *.c mv temp/* . rmdir temp #In GNU Make, ignore whether `stage*' exists. .PHONY: stage1 stage2 stage3 clean realclean TAGS bootstrap force: