Commit c6798fb2 authored by David Johnson's avatar David Johnson

Finally implement proper header dependencies in the build.

Just the basic gcc -MD -MP -MF $bar, but libtool'ized as necessary.
parent e65d4670
......@@ -128,7 +128,7 @@ vpath % $(SRCDIR) $(MOSTLY_SRCDIRS)
# Define rules which we blew away with .SUFFIXES
#
%.o: %.c
$(CC) -c -o $@ $(CFLAGS) $<
$(CC) -c -o $@ $(CFLAGS) -MD -MP -MF ${@:.o=.d} $<
%.o: %.cc
$(CXX) -c -o $@ $(CXXFLAGS) $<
......@@ -139,6 +139,10 @@ vpath % $(SRCDIR) $(MOSTLY_SRCDIRS)
%.o: %.C
$(CXX) -c -o $@ $(CXXFLAGS) $<
.c.lo: $(HEADERS)
$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} \
-MD -MP -MT $@ -MF ${@:.lo=.d} -c $<
%: %-debug
$(STRIP) -o $@$(EXE) $<$(EXE)
......
......@@ -37,14 +37,8 @@ ifeq ($(ENABLE_LIBVMI),"1")
ENABLE_XENSUPPORT=1
endif
HEADERS := $(SRCDIR)/analysis.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h
OBJECTS := analysis.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
#
# We have to be careful here! We can only depend libs in xml/schema; more
......@@ -63,7 +57,6 @@ STATICLIBS := $(OBJDIR)/dwdebug/libtarget.a $(OBJDIR)/dwdebug/libdwdebug.a \
#
ifeq ("@ENABLE_SOAP@","1")
CFLAGS += -I$(TOP_SRCDIR)/xml/schema -I$(OBJDIR)/xml/schema
HEADERS += $(TOP_SRCDIR)/xml/schema/analysis_xml.h
STATICLIBS += $(OBJDIR)/xml/schema/libdebuginfo_xml.la \
$(OBJDIR)/xml/schema/libtarget_xml.la \
$(OBJDIR)/xml/schema/libanalysis_xml.la
......@@ -83,14 +76,14 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
libanalysis.la: $(OBJECTS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) \
-rpath $(INSTALL_LIBDIR) ${LDFLAGS}
#analyze: $(HEADERS) libanalysis.a analyze.lo $(STATICLIBS)
#analyze: libanalysis.a analyze.lo $(STATICLIBS)
# $(CC) -o $@ $(CFLAGS) $@.o libtarget.a $(STATICLIBS) $(LDFLAGS)
......@@ -112,6 +105,7 @@ install: def-install install-subdirs
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(LIBRARIES)
@$(LIBTOOL) --mode=clean rm -f $(PROGRAMS)
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -60,15 +60,8 @@ endif
LDFLAGS += -L$(CLIPSSRC) -lclips -lm -lrt
HEADERS := $(SRCDIR)/command_interface.h $(SRCDIR)/policy_engine.h \
$(SRCDIR)/repair_engine.h $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h
OBJECTS := policy_engine.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES :=
......@@ -100,10 +93,10 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
policy_engine: $(HEADERS) $(LIBRARIES) $(OBJECTS) $(STATICLIBS)
policy_engine: $(LIBRARIES) $(OBJECTS) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $(OBJECTS) \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -112,6 +105,7 @@ install: def-install install-subdirs
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS)
$(RM) $(LIBRARIES) $(PROGRAMS)
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -36,16 +36,9 @@ PYCFLAGS += -I@PYTHON_INCLUDE@ $(LCFLAGS)
LDFLAGS += $(ELFUTILS_LDFLAGS) $(GLIB_LDFLAGS)
HEADERS := $(SRCDIR)/dwdebug.h $(SRCDIR)/dwdebug_priv.h \
$(SRCDIR)/binfile.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h $(TOP_SRCDIR)/include/clfit.h \
$(TOP_SRCDIR)/include/glib_wrapper.h
OBJECTS := symdict.lo scope.lo location.lo binfile.lo binfile_elf.lo debug.lo \
dwarf_debuginfo.lo dwarf_elfutils.lo dwarf_expr.lo dwarf_cfa.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES := libdwdebug.la
STATICLIBS := $(OBJDIR)/lib/libvmilib.la
ifeq ($(ENABLE_PYTHON),"1")
......@@ -70,8 +63,8 @@ all: $(LIBRARIES) $(SWIGLIBS) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
libdwdebug.la: $(OBJECTS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) \
......@@ -90,7 +83,7 @@ libpydwdebug.la: dwdebug_wrap_py.lo
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $< -rpath $(INSTALL_LIBDIR) \
${LDFLAGS}
dumpdebuginfo: $(HEADERS) $(LIBRARIES) dumpdebuginfo.lo $(STATICLIBS)
dumpdebuginfo: $(LIBRARIES) dumpdebuginfo.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -114,6 +107,7 @@ clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(PROGRAMS)
rm -f dumpdebuginfo* .libs/dwdebug_wrap* dwdebug_wrap* dwdebug.py
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -32,16 +32,9 @@ CFLAGS += $(GLIB_CFLAGS)
LDFLAGS += $(GLIB_LDFLAGS)
HEADERS := $(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/log.h $(TOP_SRCDIR)/include/clfit.h \
$(TOP_SRCDIR)/include/waitpipe.h $(TOP_SRCDIR)/include/evloop.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/output.h \
$(TOP_SRCDIR)/lib/debugpred.h $(TOP_SRCDIR)/include/arch.h \
$(TOP_SRCDIR)/include/arch_x86.h $(TOP_SRCDIR)/include/arch_x86_64.h \
$(TOP_SRCDIR)/include/regcache.h
OBJECTS := ref.lo log.lo clfit.lo waitpipe.lo evloop.lo monitor.lo \
arch.lo arch_x86.lo arch_x86_64.lo regcache.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES := libvmilib.la libloadall.la libloadallforever.la libloadallpagebypage.la
INST_INC = debugpred.h
......@@ -57,8 +50,8 @@ all: $(LIBRARIES) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
libvmilib.la: $(OBJECTS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) -rpath $(INSTALL_LIBDIR) ${LDFLAGS}
......@@ -92,6 +85,7 @@ clean: clean-subdirs
log.lo libvmilib.lo loadall.lo loadallforever.lo libloadallpagebypage.lo
$(RM) -f $(LIBRARIES) log.o libvmilib.* libvmilib.* loadall*
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -63,15 +63,6 @@ ifeq ($(ENABLE_DISTORM),"1")
PCLDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h $(TOP_SRCDIR)/dwdebug/dwdebug_priv.h \
$(TOP_SRCDIR)/dwdebug/binfile.h \
$(SRCDIR)/target.h $(SRCDIR)/target_api.h \
$(SRCDIR)/probe.h $(SRCDIR)/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h $(TOP_SRCDIR)/include/clfit.h \
$(TOP_SRCDIR)/include/glib_wrapper.h
OBJECTS := target.lo target_api.lo target_generic.lo memory.lo location.lo \
symbol.lo value.lo probe.lo probe_lib.lo probe_value.lo probe_filter.lo \
target_nv_filter.lo target_event.lo \
......@@ -93,6 +84,7 @@ endif
ifeq ($(ENABLE_DISTORM),"1")
OBJECTS += disasm.lo
endif
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES := libtarget.la libqemuhacks.la
......@@ -132,8 +124,8 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
libtarget.la: $(OBJECTS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) \
......@@ -143,11 +135,11 @@ libqemuhacks.la: qemuhacks.lo
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ qemuhacks.lo \
-rpath $(INSTALL_LIBDIR) -ldl
dumptarget: $(HEADERS) dumptarget.lo $(LIBRARIES) $(STATICLIBS)
dumptarget: dumptarget.lo $(LIBRARIES) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
target_xen_vm_vmp: $(HEADERS) target_xen_vm_vmp.lo $(LIBRARIES) $(STATICLIBS)
target_xen_vm_vmp: target_xen_vm_vmp.lo $(LIBRARIES) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -171,6 +163,7 @@ clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(PROGRAMS)
rm -f dumptarget* target_xen_vm_vmp* qemuhacks*
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -48,16 +48,6 @@ ifeq ($(ENABLE_DISTORM),"1")
endif
LDFLAGS += -lpthread
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/waitpipe.h $(TOP_SRCDIR)/include/evloop.h \
$(TOP_SRCDIR)/include/monitor.h \
$(TOP_SRCDIR)/include/output.h $(TOP_SRCDIR)/include/clfit.h \
$(TOP_SRCDIR)/include/regcache.h $(TOP_SRCDIR)/include/arch.h
LIBRARIES := libvmitest.la
OBJECTS := monitor_dummy.lo
......@@ -73,6 +63,7 @@ else
ASSISTANTS += regval_x86
endif
TESTOBJECTS += $(addsuffix .lo,$(ASSISTANTS))
DEPENDENCIES := $(OBJECTS:%.lo=%.d) $(TESTOBJECTS:%.lo=%.d)
STATICLIBS := $(OBJDIR)/dwdebug/libdwdebug.la $(OBJDIR)/lib/libvmilib.la
# $(OBJDIR)/target/libtarget.la
......@@ -90,8 +81,8 @@ all: $(LIBRARIES) $(ASSISTANTS) $(TESTOBJECTS) $(TESTS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
libvmitest.la: $(HEADERS) $(OBJECTS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS)
......@@ -110,47 +101,47 @@ threads.leader.exit: threads.leader.exit.lo
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
-pthread
clrange: $(HEADERS) $(LIBRARIES) clrange.lo $(STATICLIBS)
clrange: $(LIBRARIES) clrange.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
clrangesimple: $(HEADERS) $(LIBRARIES) clrangesimple.lo $(STATICLIBS)
clrangesimple: $(LIBRARIES) clrangesimple.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
clmatch: $(HEADERS) $(LIBRARIES) clmatch.lo $(STATICLIBS)
clmatch: $(LIBRARIES) clmatch.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
clmatchone: $(HEADERS) $(LIBRARIES) clmatchone.lo $(STATICLIBS)
clmatchone: $(LIBRARIES) clmatchone.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
evloop_waitpipe: $(HEADERS) $(LIBRARIES) evloop_waitpipe.lo $(STATICLIBS)
evloop_waitpipe: $(LIBRARIES) evloop_waitpipe.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
monitor_threads: $(HEADERS) $(LIBRARIES) monitor_threads.lo $(STATICLIBS)
monitor_threads: $(LIBRARIES) monitor_threads.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
monitor_processes: $(HEADERS) $(LIBRARIES) monitor_processes.lo $(STATICLIBS)
monitor_processes: $(LIBRARIES) monitor_processes.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
monitored_dummy_child: $(HEADERS) $(LIBRARIES) monitored_dummy_child.lo $(STATICLIBS)
monitored_dummy_child: $(LIBRARIES) monitored_dummy_child.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
regcache: $(HEADERS) $(LIBRARIES) regcache.lo $(STATICLIBS)
regcache: $(LIBRARIES) regcache.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
regval_x86: $(HEADERS) $(LIBRARIES) regval_x86.lo $(STATICLIBS)
regval_x86: $(LIBRARIES) regval_x86.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
regval_x86_64: $(HEADERS) $(LIBRARIES) regval_x86_64.lo $(STATICLIBS)
regval_x86_64: $(LIBRARIES) regval_x86_64.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -169,6 +160,7 @@ install: def-install install-subdirs
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(LIBRARIES) $(ASSISTANTS) $(TESTS) $(TESTOBJECTS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -61,14 +61,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h
OBJECTS := probetargets.lo dumpthreads.lo backtrace.lo psaction.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES :=
......@@ -94,22 +88,22 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
probetargets: $(HEADERS) $(LIBRARIES) probetargets.lo $(STATICLIBS)
probetargets: $(LIBRARIES) probetargets.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
dumpthreads: $(HEADERS) $(LIBRARIES) dumpthreads.lo $(STATICLIBS)
dumpthreads: $(LIBRARIES) dumpthreads.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
psaction: $(HEADERS) $(LIBRARIES) psaction.lo $(STATICLIBS)
psaction: $(LIBRARIES) psaction.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
backtrace: $(HEADERS) $(LIBRARIES) backtrace.lo $(STATICLIBS)
backtrace: $(LIBRARIES) backtrace.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -119,6 +113,7 @@ clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS)
$(RM) -f $(LIBRARIES)
$(RM) -f $(PROGRAMS)
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2012, 2013 The University of Utah
## Copyright (c) 2012, 2013, 2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -48,10 +48,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/tools/bts/bts.h
OBJECTS := io.lo symbol.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES :=
......@@ -73,25 +71,25 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
bts_extract: $(HEADERS) $(OBJECTS) bts_extract.lo $(STATICLIBS)
bts_extract: $(OBJECTS) bts_extract.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
bts_dump: $(HEADERS) $(OBJECTS) bts_dump.lo $(STATICLIBS)
bts_dump: $(OBJECTS) bts_dump.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
bts_trace: $(HEADERS) $(OBJECTS) bts_trace.lo $(STATICLIBS)
bts_trace: $(OBJECTS) bts_trace.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
replay.o: $(TOP_SRCDIR)/xentt/replay.c
$(CC) -c -o replay.o $(CFLAGS) $<
trace_task: $(HEADERS) $(STATICLIBS) replay.o trace_task.lo
trace_task: $(STATICLIBS) replay.o trace_task.lo
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) replay.o $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
......@@ -103,6 +101,7 @@ clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS) $(addsuffix .lo,$(PROGRAMS))
$(RM) -f replay.o
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2013 The University of Utah
## Copyright (c) 2013, 2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -54,15 +54,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h \
$(TOP_SRCDIR)/tools/cfi/cfi.h
OBJECTS := cfi_util.lo
OBJECTS := cfi_util.lo cfi_check.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
PROGRAMS := cfi_check
......@@ -86,11 +79,11 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
cfi_check: $(HEADERS) $(OBJECTS) cfi_check.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
cfi_check: $(OBJECTS) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
install: def-install install-subdirs
......@@ -100,8 +93,9 @@ install: def-install install-subdirs
$(INSTALL_LIBEXECDIR)/analysis/CfiCheck
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS) cfi_check.lo
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
......@@ -54,15 +54,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h \
$(TOP_SRCDIR)/tools/nullpage/nullpage.h
OBJECTS := nullpage_util.lo
OBJECTS := nullpage_util.lo nullpage_check.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
PROGRAMS := nullpage_check
......@@ -86,11 +79,11 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
nullpage_check: $(HEADERS) $(OBJECTS) nullpage_check.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
nullpage_check: $(OBJECTS) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
install: def-install install-subdirs
......@@ -100,8 +93,9 @@ install: def-install install-subdirs
$(INSTALL_LIBEXECDIR)/analysis/NullpageCheck
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS) nullpage_check.lo
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2012-2013 The University of Utah
## Copyright (c) 2012-2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -54,15 +54,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h \
$(TOP_SRCDIR)/tools/rop/rop.h
OBJECTS := rop_util.lo
OBJECTS := rop_util.lo rop_checkret.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
PROGRAMS := rop_checkret
......@@ -86,11 +79,11 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
rop_checkret: $(HEADERS) $(OBJECTS) rop_checkret.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
rop_checkret: $(OBJECTS) $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ \
$(CFLAGS) $(OBJECTS) $(STATICLIBS) $(LDFLAGS)
install: def-install install-subdirs
......@@ -100,8 +93,9 @@ install: def-install install-subdirs
$(INSTALL_LIBEXECDIR)/analysis/RopComeFrom
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS) rop_checkret.lo
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2013 The University of Utah
## Copyright (c) 2013, 2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -54,14 +54,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h
OBJECTS := spf.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
PROGRAMS := spf
......@@ -85,10 +79,10 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
spf: $(HEADERS) $(LIBRARIES) spf.lo $(STATICLIBS)
spf: $(LIBRARIES) spf.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -101,6 +95,7 @@ install: def-install install-subdirs
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2013 The University of Utah
## Copyright (c) 2013, 2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -54,15 +54,8 @@ ifeq ($(ENABLE_DISTORM),"1")
LDFLAGS += -L$(DISTORM)/lib -ldistorm3
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h \
$(TOP_SRCDIR)/target/target.h $(TOP_SRCDIR)/target/target_api.h \
$(TOP_SRCDIR)/target/probe.h $(TOP_SRCDIR)/target/probe_api.h \
$(TOP_SRCDIR)/include/list.h $(TOP_SRCDIR)/include/alist.h \
$(TOP_SRCDIR)/include/common.h $(TOP_SRCDIR)/include/log.h \
$(TOP_SRCDIR)/include/output.h \
$(TOP_SRCDIR)/tools/cfi/cfi.h
OBJECTS := dumpsyscalltable.lo strace.lo
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
PROGRAMS := dumpsyscalltable strace
......@@ -86,14 +79,14 @@ all: $(LIBRARIES) $(PROGRAMS) all-subdirs
include $(TOP_SRCDIR)/Makerules
.c.lo: $(HEADERS)
@$(LIBTOOL) --tag=CC --mode=compile ${CC} ${CFLAGS} -c $<
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
dumpsyscalltable: $(HEADERS) $(LIBRARIES) dumpsyscalltable.lo $(STATICLIBS)
dumpsyscalltable: $(LIBRARIES) dumpsyscalltable.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
strace: $(HEADERS) $(OBJECTS) strace.lo $(STATICLIBS)
strace: $(OBJECTS) strace.lo $(STATICLIBS)
@$(LIBTOOL) --tag=CC --mode=link $(CC) $(LT_LDFLAGS) -o $@ $@.lo \
$(CFLAGS) $(LIBRARIES) $(STATICLIBS) $(LDFLAGS)
......@@ -106,6 +99,7 @@ install: def-install install-subdirs
clean: clean-subdirs
@$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(PROGRAMS)
$(RM) -rf .libs
$(RM) -f $(DEPENDENCIES)
distclean: distclean-subdirs
......
## -*- mode: Makefile -*-
##
## Copyright (c) 2013 The University of Utah
## Copyright (c) 2013, 2014 The University of Utah
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
......@@ -72,21 +72,15 @@ ifeq ($(ENABLE_LIBVMI),"1")
STATICLIBS += $(LIBVMI)/lib/libvmi.a
endif
HEADERS := $(TOP_SRCDIR)/dwdebug/dwdebug.h $(TOP_SRCDIR)/dwdebug/dwdebug_priv.h \
$(SRCDIR)/debuginfo_xml.h \
$(TOP_SRCDIR)/target/target_api.h $(TOP_SRCDIR)/target/target_api.h \
$(SRCDIR)/target_xml.h \
$(TOP_SRCDIR)/analysis/analysis.h $(SRCDIR)/analysis_xml.h \
$(SRCDIR)/../util.h
OBJECTS-COMMON-LIB := common_xml_moduleC.lo common_xml.lo xsdcC.lo
#envC.lo
OBJECTS-DEBUGINFO-LIB := debuginfo_xml.lo debuginfo_xml_moduleC.lo
OBJECTS-TARGET-LIB := target_xml.lo target_xml_moduleC.lo
OBJECTS-ANALYSIS-LIB := analysis_xml.lo analysis_xml_moduleC.lo
OBJECTS-DEBUGINFO-LIB := debuginfo_xml_moduleC.lo debuginfo_xml.lo
OBJECTS-TARGET-LIB := target_xml_moduleC.lo target_xml.lo
OBJECTS-ANALYSIS-LIB := analysis_xml_moduleC.lo analysis_xml.lo
OBJECTS := $(OBJECTS-COMMON-LIB) $(OBJECTS-DEBUGINFO-LIB) $(OBJECTS-TARGET-LIB) \
$(OBJECTS-ANALYSIS-LIB)
DEPENDENCIES := $(OBJECTS:%.lo=%.d)
LIBRARIES := libcommon_xml.la libdebuginfo_xml.la libtarget_xml.la \
libanalysis_xml.la
......@@ -102,6 +96,9 @@ all: $(PROGRAMS) $(LIBRARIES) all-subdirs
include $(TOP_SRCDIR)/Makerules
# Don't fail on missing .d files; there won't be any on the first run.
-include $(DEPENDENCIES)
#env.h: $(SRCDIR)/xsdc.gsm.h
## echo '#import "xsdc.gsm.h"' > env.h
# touch env.h
......@@ -117,11 +114,11 @@ xsdcH.h: $(SRCDIR)/xsdc.gsm.h