From 0f595e076f03c02b366901e8d3c5cc0c50681108 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Tue, 23 Aug 2016 02:46:27 +0200 Subject: generic plugin manager example, fully working --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d6ce077 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +FILENAME = pluginmanager + +all: all_plugins executable + @echo "> MAKING ALL..." + +test: all + @echo "> TESTING PLUGIN1..." + ./$(FILENAME) ./plugin1.so + @echo "> TESTING PLUGIN2..." + ./$(FILENAME) ./plugin2.so + @echo "> TESTING PLUGIN3..." + ./$(FILENAME) ./plugin3.so + +clean: + @echo "> CLEANING..." + rm $(FILENAME) + rm *.so + +all_plugins: + @echo "> MAKING PLUGINS..." + $(CXX) $(CXXFLAGS) -shared -fPIC -o plugin1.so plugins/plugin_test1.cpp + $(CXX) $(CXXFLAGS) -shared -fPIC -o plugin2.so plugins/plugin_test2.cpp + $(CXX) $(CXXFLAGS) -shared -fPIC -o plugin3.so plugins/plugin_test3.cpp + +executable: + $(CXX) $(CXXFLAGS) -o $(FILENAME) main.cpp -ldl -- cgit v1.2.3