diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | libsayhello-spanish.so | bin | 0 -> 8976 bytes | |||
-rwxr-xr-x | libsayhello-stderr.so | bin | 0 -> 8976 bytes | |||
-rwxr-xr-x | libsayhello-swedish.so | bin | 0 -> 8976 bytes | |||
-rwxr-xr-x | sayhello | bin | 0 -> 10760 bytes | |||
-rwxr-xr-x | sayhello-direct | bin | 0 -> 10512 bytes | |||
-rw-r--r-- | sayhello.c | 4 |
7 files changed, 8 insertions, 1 deletions
@@ -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 Binary files differnew file mode 100755 index 0000000..cf1ff93 --- /dev/null +++ b/libsayhello-spanish.so diff --git a/libsayhello-stderr.so b/libsayhello-stderr.so Binary files differnew file mode 100755 index 0000000..4842eec --- /dev/null +++ b/libsayhello-stderr.so diff --git a/libsayhello-swedish.so b/libsayhello-swedish.so Binary files differnew file mode 100755 index 0000000..c9e3011 --- /dev/null +++ b/libsayhello-swedish.so diff --git a/sayhello b/sayhello Binary files differnew file mode 100755 index 0000000..19c95cd --- /dev/null +++ b/sayhello diff --git a/sayhello-direct b/sayhello-direct Binary files differnew file mode 100755 index 0000000..4b0e50f --- /dev/null +++ b/sayhello-direct @@ -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; } |