summaryrefslogtreecommitdiffstats
path: root/utest/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:25:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:25:46 +0000
commit5277429a362a9cf4ce649557bf4c8fe0e20c05c0 (patch)
tree52cc97728c6fbb7393984dc3db05c5836107fe44 /utest/Makefile
parentInitial commit. (diff)
downloadlibtraceevent-5277429a362a9cf4ce649557bf4c8fe0e20c05c0.tar.xz
libtraceevent-5277429a362a9cf4ce649557bf4c8fe0e20c05c0.zip
Adding upstream version 1:1.7.1.upstream/1%1.7.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'utest/Makefile')
-rw-r--r--utest/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/utest/Makefile b/utest/Makefile
new file mode 100644
index 0000000..160bdb4
--- /dev/null
+++ b/utest/Makefile
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: LGPL-2.1
+
+include $(src)/scripts/utils.mk
+
+TARGETS = $(bdir)/trace-utest
+
+OBJS =
+OBJS += trace-utest.o
+OBJS += traceevent-utest.o
+
+LIBS += -lcunit \
+ -ldl \
+ $(LIBTRACEEVENT_STATIC)
+
+OBJS := $(OBJS:%.o=$(bdir)/%.o)
+DEPS := $(OBJS:$(bdir)/%.o=$(bdir)/.%.d)
+
+$(OBJS): | $(bdir)
+$(DEPS): | $(bdir)
+
+$(bdir)/trace-utest: $(OBJS) $(LIBTRACEEVENT_STATIC)
+ $(Q)$(do_app_build)
+
+$(bdir)/%.o: %.c
+ $(Q)$(call do_fpic_compile)
+
+$(DEPS): $(bdir)/.%.d: %.c
+ $(Q)$(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@
+ $(Q)$(CC) -M -MT $(bdir)/$*.o $(CPPFLAGS) $(CFLAGS) $< > $@
+
+$(OBJS): $(bdir)/%.o : $(bdir)/.%.d
+
+dep_includes := $(wildcard $(DEPS))
+
+test: $(TARGETS)
+
+clean:
+ $(Q)$(call do_clean,$(TARGETS) $(bdir)/*.o $(bdir)/.*.d)