# Profiling options need to go here to work.
# I think it's perfectly reasonable for a user to set -pg in CFLAGS
# and have it work; that's why CFLAGS is here.
-INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) @CONFIG_LDFLAGS@
+INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) @CONFIG_LDFLAGS@ @HLDFLAGS@
+HLDENV = @HLDENV@
# We are using our own version of REGEX now to be consistent across
# machines.
@rm -f init.c-tmp
@echo '/* Do not modify this file. */' >init.c-tmp
@echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
- @echo 'void initialize_all_files () {' >>init.c-tmp
- @for i in $(OBS) $(TSOBS); do \
- filename=`echo $$i | sed \
- -e '/^Onindy.o/d' \
+ @echo '#include "ansidecl.h"' >>init.c-tmp
+ @echo 'extern void initialize_all_files PARAMS ((void));' >>init.c-tmp
+ @echo 'void initialize_all_files PARAMS ((void)) {' >>init.c-tmp
+ @echo $(OBS) $(TSOBS) | \
+ tr ' ' '\012' | \
+ sed -e '/^Onindy.o/d' \
-e '/^nindy.o/d' \
-e '/ttyflush.o/d' \
-e '/xdr_ld.o/d' \
-e '/version.o/d' \
-e '/^[a-z0-9A-Z_]*_[SU].o/d' \
-e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
- -e 's/\.o/.c/'` ; \
- case $$filename in \
- "") ;; \
- *) sed <$(srcdir)/$$filename >>init.c-tmp -n \
- -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; ;; \
- esac ; \
- done
+ -e 's/\.o/.c/' \
+ -e 's|\([^ ][^ ]*\)|$(srcdir)/\1|g' | \
+ xargs grep -s '^_initialize_[a-z_0-9A-Z]* *(' | \
+ sed -n -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 PARAMS ((void)); \1 ();}/' >>init.c-tmp
@echo '}' >>init.c-tmp
@mv init.c-tmp init.c
# Removing the old gdb first works better if it is running, at least on SunOS.
gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
rm -f gdb
- $(CC_LD) $(INTERNAL_LDFLAGS) -o gdb \
+ $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) -o gdb \
init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
nlm: force
somsolib.o: somsolib.c $(defs_h)
+hpux-thread.o: hpux-thread.c $(defs_h) gdbthread.h target.h inferior.h
+ $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
+ -I$(srcdir)/osf-share/HP800 -I/usr/include/dce $(srcdir)/hpux-thread.c
+
hpread.o: hpread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
vx-share/xdr_rdb.h gdb_string.h
+remote-wiggler.o: remote-wiggler.c $(wait_h) complaints.h $(defs_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(inferior_h) target.h
+
remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) $(remote_utils_h) gdb_string.h