-I. \
-I$(srcdir) \
-I$(srcdir)/config \
+ -include $(srcdir)/defs.h \
-DLOCALEDIR="\"$(localedir)\"" \
$(DEFS)
@echo Checking headers.
for i in $(CHECK_HEADERS) ; do \
$(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
- $(INTERNAL_CFLAGS) $(CXXFLAGS) -include defs.h $(srcdir)/$$i ; \
+ $(INTERNAL_CFLAGS) $(CXXFLAGS) $(srcdir)/$$i ; \
done
.PHONY: check-headers
COMPILE.post = -c -o $@
POSTCOMPILE = @true
+INCLUDE_SERVER_H = -include $(srcdir)/server.h
+
# CXXFLAGS is at the very end on purpose, so that user-supplied flags can
# override internal flags.
-COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(CXXFLAGS) $(COMPILE.post)
+COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(INCLUDE_SERVER_H) \
+ $(CXXFLAGS) $(COMPILE.post)
# It is also possible that you will need to add -I/usr/include/sys to the
# CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
# CXXFLAGS is at the very end on purpose, so that user-supplied flags can
# override internal flags.
-IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(CXXFLAGS) $(COMPILE.post)
+IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) \
+ $(INCLUDE_SERVER_H) $(CXXFLAGS) $(COMPILE.post)
# Rules for special cases.
%-generated.cc: ../gdb/regformats/rs6000/%.dat $(regdat_sh)
$(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@
+# Rule for gdbreplay.o. This is the same as COMPILE, but includes common-defs.h
+# instead of server.h.
+gdbreplay.o: gdbreplay.cc
+ $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(CXXFLAGS) \
+ -include gdbsupport/common-defs.h $(COMPILE.post) $<
+
#
# Dependency tracking.
#