Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mem-leaks/Makefile')
-rw-r--r--tests/mem-leaks/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/mem-leaks/Makefile b/tests/mem-leaks/Makefile
new file mode 100644
index 00000000..91bc280d
--- /dev/null
+++ b/tests/mem-leaks/Makefile
@@ -0,0 +1,30 @@
+TCF_AGENT_DIR=../../agent
+
+include $(TCF_AGENT_DIR)/Makefile.inc
+
+override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
+
+HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
+CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
+
+EXECS = $(BINDIR)/agent$(EXTEXE)
+
+all: $(EXECS)
+
+$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
+ $(AR) -rc $@ $^
+ $(RANLIB)
+
+$(BINDIR)/agent$(EXTEXE): $(BINDIR)/tcf/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
+ $(CC) $(CFLAGS) -o $@ $(BINDIR)/tcf/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
+
+$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
+ @$(call MKDIR,$(dir $@))
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
+ @$(call MKDIR,$(dir $@))
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+ $(call RMDIR,$(BINDIR))

Back to the top