From 478a4c0a89224f3b8b0641fd5480b81090259f15 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 19 Apr 2017 11:59:45 +0200 Subject: allow build without plugins --- Makefile | 5 ++++- libsayhello-spanish.so | Bin 0 -> 8976 bytes libsayhello-stderr.so | Bin 0 -> 8976 bytes libsayhello-swedish.so | Bin 0 -> 8976 bytes sayhello | Bin 0 -> 10760 bytes sayhello-direct | Bin 0 -> 10512 bytes sayhello.c | 4 ++++ 7 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 libsayhello-spanish.so create mode 100755 libsayhello-stderr.so create mode 100755 libsayhello-swedish.so create mode 100755 sayhello create mode 100755 sayhello-direct 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 Binary files /dev/null and b/libsayhello-spanish.so differ diff --git a/libsayhello-stderr.so b/libsayhello-stderr.so new file mode 100755 index 0000000..4842eec Binary files /dev/null and b/libsayhello-stderr.so differ diff --git a/libsayhello-swedish.so b/libsayhello-swedish.so new file mode 100755 index 0000000..c9e3011 Binary files /dev/null and b/libsayhello-swedish.so differ diff --git a/sayhello b/sayhello new file mode 100755 index 0000000..19c95cd Binary files /dev/null and b/sayhello differ diff --git a/sayhello-direct b/sayhello-direct new file mode 100755 index 0000000..4b0e50f Binary files /dev/null and b/sayhello-direct 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; } -- cgit v1.2.3