diff options
author | K. Richard Pixley <rich@cygnus> | 1992-04-21 19:43:05 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1992-04-21 19:43:05 +0000 |
commit | 6e6bf7f2ca5ea49448c7013f3354269dd77312c2 (patch) | |
tree | 5b1f3c47cb3e8f4262caaaa5b673ffef9d92e8a4 /gdb/Makefile.in | |
parent | 196377eec673c1ebbf175d3299d8bdf5133b122b (diff) | |
download | gdb-6e6bf7f2ca5ea49448c7013f3354269dd77312c2.zip gdb-6e6bf7f2ca5ea49448c7013f3354269dd77312c2.tar.gz gdb-6e6bf7f2ca5ea49448c7013f3354269dd77312c2.tar.bz2 |
Makefile.in: rework CFLAGS so that they can be set from the command
line to make. CFLAGS -> INTERNAL_CFLAGS. USER_CFLAGS -> CFLAGS.
Remove MINUS_G. Default CFLAGS to -g. Pass CFLAGS on recusions.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 91 |
1 files changed, 28 insertions, 63 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 38d5880..7b4a2d6 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -133,14 +133,14 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/ # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS. # CFLAGS for GDB -MINUS_G=-g GLOBAL_CFLAGS = ${MINUS_G} ${TM_CFLAGS} ${XM_CFLAGS} #PROFILE_CFLAGS = -pg -# CFLAGS is the aggregate of several individual *_CFLAGS macros. -# USER_CFLAGS is specifically reserved for setting from the command line +# CFLAGS is specifically reserved for setting from the command line # when running make. I.E. "make USER_CFLAGS=-Wmissing-prototypes". -CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS} +CFLAGS = -g +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS} # None of the things in CFLAGS will do any harm, and on some systems # (e.g. SunOS4) it is important to use the M_CFLAGS. LDFLAGS = $(CFLAGS) @@ -294,7 +294,7 @@ YYOBJ = c-exp.tab.o m2-exp.tab.o # Prevent Sun make from putting in the machine type. Setting # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. .c.o: - ${CC} -c ${CFLAGS} $< + ${CC} -c ${INTERNAL_CFLAGS} $< all: gdb $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" @@ -527,7 +527,8 @@ make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info cd proto-gdb.dir ; for i in ${TARDIRS}; do \ (mkdir $$i; cd $$i; \ ln -s ../../$$i/* .; \ - rm -rf SCCS CVS.adm RCS config.status); done + rm -rf SCCS CVS.adm RCS config.status; \ + if test -f Makefile.in; then rm Makefile; else true); done mkdir proto-gdb.dir/config cd proto-gdb.dir/config ; \ for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done @@ -542,24 +543,24 @@ clean: rm -f init.c version.c rm -f gdb core gdb.tar gdb.tar.Z make.log rm -f gdb[0-9] - $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" + @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" distclean: clean c-exp.tab.c m2-exp.tab.c TAGS rm -f tm.h xm.h config.status rm -f y.output yacc.acts yacc.tmp rm -f ${TESTS} Makefile depend - $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" + @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" realclean: clean rm -f c-exp.tab.c m2-exp.tab.c TAGS rm -f tm.h xm.h config.status rm -f Makefile depend - $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" + @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb subdir_do: force - for i in $(DODIRS); do \ + @for i in $(DODIRS); do \ if [ -d ./$$i ] ; then \ if (cd ./$$i; \ $(MAKE) \ @@ -567,6 +568,7 @@ subdir_do: force "AR=$(AR)" \ "AR_FLAGS=$(AR_FLAGS)" \ "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ "RANLIB=$(RANLIB)" \ "MAKEINFO=$(MAKEINFO)" \ "BISON=$(BISON)" $(DO)) ; then true ; \ @@ -574,43 +576,6 @@ subdir_do: force else true ; fi ; \ done -# Copy the object files from a particular stage into a subdirectory. -stage1: force - -mkdir stage1 - -mv -f $(STAGESTUFF) stage1 - $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)" - -stage2: force - -mkdir stage2 - -mv -f $(STAGESTUFF) stage2 - $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)" - -stage3: force - -mkdir stage3 - -mv -f $(STAGESTUFF) stage3 - $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)" - -against=stage2 - -comparison: force - for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done - $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)" - -de-stage1: force - -(cd stage1 ; mv -f * ..) - -rmdir stage1 - $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)" - -de-stage2: force - -(cd stage2 ; mv -f * ..) - -rmdir stage2 - $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)" - -de-stage3: force - -(cd stage3 ; mv -f * ..) - -rmdir stage3 - $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)" - Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(SHELL) ./config.status @@ -664,51 +629,51 @@ m2-exp.tab.c: $(srcdir)/m2-exp.y # The symbol-file readers have dependencies on BFD header files. dbxread.o: ${srcdir}/dbxread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c coffread.o: ${srcdir}/coffread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c mipsread.o: ${srcdir}/mipsread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c elfread.o: ${srcdir}/elfread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c dwarfread.o: ${srcdir}/dwarfread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c xcoffread.o: ${srcdir}/xcoffread.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c xcoffexec.o: ${srcdir}/xcoffexec.c - ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c + ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c # Drag in the files that are in another directory. xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c - ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ld.c xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c - ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c - ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_rdb.c xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c - ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_regs.c nindy.o: ${srcdir}/nindy-share/nindy.c - ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/nindy.c Onindy.o: ${srcdir}/nindy-share/Onindy.c - ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/Onindy.c ttybreak.o: ${srcdir}/nindy-share/ttybreak.c - ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttybreak.c ttyflush.o: ${srcdir}/nindy-share/ttyflush.c - ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c + ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c lint: $(LINTFILES) $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ @@ -724,7 +689,7 @@ force_update: # -Dnounderscore. cplus-dem.o: cplus-dem.c - ${CC} -c ${CFLAGS} -Dnounderscore \ + ${CC} -c ${INTERNAL_CFLAGS} -Dnounderscore \ `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'` # GNU Make has an annoying habit of putting *all* the Makefile variables |