# {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)
# 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)"
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
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) \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
+ "CFLAGS=$(CFLAGS)" \
"RANLIB=$(RANLIB)" \
"MAKEINFO=$(MAKEINFO)" \
"BISON=$(BISON)" $(DO)) ; then true ; \
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
# 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) \
# -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