aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2020-05-29 18:16:33 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2020-05-29 18:16:33 +0200
commit8b09eab8df86a8dfd8af3437c8173c590b577849 (patch)
treee961291d0f5d60490b998e9cc61cd1523ae2de69 /examples
parente82d130bd9dcdad7849c3251623897cd52414d6c (diff)
downloadembedlog-8b09eab8df86a8dfd8af3437c8173c590b577849.tar.gz
embedlog-8b09eab8df86a8dfd8af3437c8173c590b577849.tar.bz2
embedlog-8b09eab8df86a8dfd8af3437c8173c590b577849.zip
cleanup building examples and tests
Remove links in examples/ and tst/ directories that were used to "staticaly" build embedlog with test and examples. Instead really link statically with libembedlog.a. This nicely cleans clutter in directories and Makefile.am. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile.am27
l---------examples/el-decode-number.c1
l---------examples/el-encode-number.c1
l---------examples/el-file.c1
l---------examples/el-flush.c1
l---------examples/el-lock.c1
l---------examples/el-options.c1
l---------examples/el-pbinary.c1
l---------examples/el-perror.c1
l---------examples/el-pmemory.c1
l---------examples/el-print.c1
l---------examples/el-puts.c1
l---------examples/el-ts.c1
l---------examples/el-tty.c1
l---------examples/el-utils.c1
l---------examples/el-utils.h1
l---------examples/snprintf.c1
17 files changed, 21 insertions, 22 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index adaa4d5..c14f881 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,17 +1,32 @@
-include $(top_srcdir)/embedlog-sources.mk
CFLAGS += -I$(top_builddir)/include -I$(top_srcdir)/src
+VLDFLAGS = -static
+VLDADD = $(top_builddir)/src/libembedlog.la
+
EXTRA_PROGRAMS = print_to_file \
print_options \
print_simple \
print_memory \
print_tty
-print_to_file_SOURCES = print-to-file.c $(embedlog_sources)
-print_options_SOURCES = print-options.c $(embedlog_sources)
-print_simple_SOURCES = print-simple.c $(embedlog_sources)
-print_memory_SOURCES = print-memory.c $(embedlog_sources)
-print_tty_SOURCES = print-tty.c $(embedlog_sources)
+print_to_file_SOURCES = print-to-file.c
+print_options_SOURCES = print-options.c
+print_simple_SOURCES = print-simple.c
+print_memory_SOURCES = print-memory.c
+print_tty_SOURCES = print-tty.c
+
+print_to_file_LDFLAGS = $(VLDFLAGS)
+print_options_LDFLAGS = $(VLDFLAGS)
+print_simple_LDFLAGS = $(VLDFLAGS)
+print_memory_LDFLAGS = $(VLDFLAGS)
+print_tty_LDFLAGS = $(VLDFLAGS)
+
+print_to_file_LDADD = $(VLDADD)
+print_options_LDADD = $(VLDADD)
+print_simple_LDADD = $(VLDADD)
+print_memory_LDADD = $(VLDADD)
+print_tty_LDADD = $(VLDADD)
+.PHONY: examples
examples: $(EXTRA_PROGRAMS)
clean-local:
diff --git a/examples/el-decode-number.c b/examples/el-decode-number.c
deleted file mode 120000
index 268c6a8..0000000
--- a/examples/el-decode-number.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-decode-number.c \ No newline at end of file
diff --git a/examples/el-encode-number.c b/examples/el-encode-number.c
deleted file mode 120000
index c90c2c0..0000000
--- a/examples/el-encode-number.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-encode-number.c \ No newline at end of file
diff --git a/examples/el-file.c b/examples/el-file.c
deleted file mode 120000
index 12ef212..0000000
--- a/examples/el-file.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-file.c \ No newline at end of file
diff --git a/examples/el-flush.c b/examples/el-flush.c
deleted file mode 120000
index 3291726..0000000
--- a/examples/el-flush.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-flush.c \ No newline at end of file
diff --git a/examples/el-lock.c b/examples/el-lock.c
deleted file mode 120000
index d509131..0000000
--- a/examples/el-lock.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-lock.c \ No newline at end of file
diff --git a/examples/el-options.c b/examples/el-options.c
deleted file mode 120000
index 7265099..0000000
--- a/examples/el-options.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-options.c \ No newline at end of file
diff --git a/examples/el-pbinary.c b/examples/el-pbinary.c
deleted file mode 120000
index 3e46c13..0000000
--- a/examples/el-pbinary.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-pbinary.c \ No newline at end of file
diff --git a/examples/el-perror.c b/examples/el-perror.c
deleted file mode 120000
index cc73051..0000000
--- a/examples/el-perror.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-perror.c \ No newline at end of file
diff --git a/examples/el-pmemory.c b/examples/el-pmemory.c
deleted file mode 120000
index 5dcc35f..0000000
--- a/examples/el-pmemory.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-pmemory.c \ No newline at end of file
diff --git a/examples/el-print.c b/examples/el-print.c
deleted file mode 120000
index 1b5a73a..0000000
--- a/examples/el-print.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-print.c \ No newline at end of file
diff --git a/examples/el-puts.c b/examples/el-puts.c
deleted file mode 120000
index 774e523..0000000
--- a/examples/el-puts.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-puts.c \ No newline at end of file
diff --git a/examples/el-ts.c b/examples/el-ts.c
deleted file mode 120000
index 478d0cd..0000000
--- a/examples/el-ts.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-ts.c \ No newline at end of file
diff --git a/examples/el-tty.c b/examples/el-tty.c
deleted file mode 120000
index b69c4ac..0000000
--- a/examples/el-tty.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-tty.c \ No newline at end of file
diff --git a/examples/el-utils.c b/examples/el-utils.c
deleted file mode 120000
index 822a39d..0000000
--- a/examples/el-utils.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-utils.c \ No newline at end of file
diff --git a/examples/el-utils.h b/examples/el-utils.h
deleted file mode 120000
index 2315c63..0000000
--- a/examples/el-utils.h
+++ /dev/null
@@ -1 +0,0 @@
-../src/el-utils.h \ No newline at end of file
diff --git a/examples/snprintf.c b/examples/snprintf.c
deleted file mode 120000
index 52193de..0000000
--- a/examples/snprintf.c
+++ /dev/null
@@ -1 +0,0 @@
-../src/snprintf.c \ No newline at end of file