summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-04-19 11:59:45 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-04-19 11:59:45 +0200
commit478a4c0a89224f3b8b0641fd5480b81090259f15 (patch)
tree000837b2f08174ee4d070cb707e39b3a100a1918
parent096fcd1d98841d931799958bdba6601c788f1ab1 (diff)
downloadsayhello-478a4c0a89224f3b8b0641fd5480b81090259f15.tar.bz2
sayhello-478a4c0a89224f3b8b0641fd5480b81090259f15.tar.xz
allow build without pluginsHEADmaster
-rw-r--r--Makefile5
-rwxr-xr-xlibsayhello-spanish.sobin0 -> 8976 bytes
-rwxr-xr-xlibsayhello-stderr.sobin0 -> 8976 bytes
-rwxr-xr-xlibsayhello-swedish.sobin0 -> 8976 bytes
-rwxr-xr-xsayhellobin0 -> 10760 bytes
-rwxr-xr-xsayhello-directbin0 -> 10512 bytes
-rw-r--r--sayhello.c4
7 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2b5bee5..ec3f588 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,12 @@
-all: sayhello sayhello-spanish.so sayhello-swedish.so sayhello-stderr.so
+all: sayhello libsayhello-spanish.so libsayhello-swedish.so libsayhello-stderr.so
sayhello: sayhello.c
$(CC) -o $@ $(CFLAGS) $<
+sayhello-direct: sayhello.c libsayhello-swedish.so
+ $(CC) -o $@ -DDISABLE_PLUGINS $(CFLAGS) $< -L$(PWD) -lsayhello-swedish
+
libsayhello-%.so: libsayhello-%.c
$(CC) -o $@ $(CFLAGS) -shared $<
diff --git a/libsayhello-spanish.so b/libsayhello-spanish.so
new file mode 100755
index 0000000..cf1ff93
--- /dev/null
+++ b/libsayhello-spanish.so
Binary files differ
diff --git a/libsayhello-stderr.so b/libsayhello-stderr.so
new file mode 100755
index 0000000..4842eec
--- /dev/null
+++ b/libsayhello-stderr.so
Binary files differ
diff --git a/libsayhello-swedish.so b/libsayhello-swedish.so
new file mode 100755
index 0000000..c9e3011
--- /dev/null
+++ b/libsayhello-swedish.so
Binary files differ
diff --git a/sayhello b/sayhello
new file mode 100755
index 0000000..19c95cd
--- /dev/null
+++ b/sayhello
Binary files differ
diff --git a/sayhello-direct b/sayhello-direct
new file mode 100755
index 0000000..4b0e50f
--- /dev/null
+++ b/sayhello-direct
Binary files differ
diff --git a/sayhello.c b/sayhello.c
index 1f132df..b107f33 100644
--- a/sayhello.c
+++ b/sayhello.c
@@ -4,6 +4,9 @@
int main(int argc, const char *argv[]) {
int i;
+#ifdef DISABLE_PLUGINS
+ sayhello();
+#else
if (argc < 2)
errx(1, "usage: sayhello PLUGIN...");
@@ -24,6 +27,7 @@ int main(int argc, const char *argv[]) {
dlclose(handle);
}
+#endif
return 0;
}