diff options
| author | Miguel <m.i@gmx.at> | 2019-03-17 18:14:32 +0100 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2019-03-17 18:14:32 +0100 |
| commit | 0e4810dcfb132bf276a282e25b8523a4009ae08b (patch) | |
| tree | dac6dce820f0a35d9ed7ea7676982a0f86fd0edb /080_blog/00018_Building/00030_The-Hell-of-Autotools | |
| parent | ad6411e9ec256b03f20b9195e25cb128fe02c628 (diff) | |
rename blog dir
Diffstat (limited to '080_blog/00018_Building/00030_The-Hell-of-Autotools')
| -rw-r--r-- | 080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md b/080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md deleted file mode 100644 index 746bd82..0000000 --- a/080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md +++ /dev/null @@ -1,74 +0,0 @@ -The Hell of Autotools -===================== - March 19, 2018 -In this trivial example we compile a custom **webkit2gtk+ extension** with -**autotools**. For a start we need to provide two files, `Makefile.am` -and `configure.ac`, beside our actual `ext.c` source file, which contains -the extension code itself. - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.c .numberLines} -// File: ext.c // - -#include <webkit2/webkit-web-extension.h> - -G_MODULE_EXPORT void -webkit_web_extension_initialize_with_user_data (WebKitWebExtension *extension, - GVariant *user_data) -{ - g_print("Hello Extension!\n"); -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.makefile .numberLines} -# File: Makefile.am # - -webextension_LTLIBRARIES = libmyappwebextension.la -webextensiondir = /home/miguel/temp - -WEB_EXTENSION_CFLAGS = `pkg-config --cflags webkit2gtk-web-extension-4.0` -WEB_EXTENSION_LIBS2 = `pkg-config --libs webkit2gtk-web-extension-4.0` - -libmyappwebextension_la_SOURCES = ext.c -libmyappwebextension_la_CFLAGS = $(WEB_EXTENSION_CFLAGS) -libmyappwebextension_la_LIBADD = $(WEB_EXTENSION_LIBS) -libmyappwebextension_la_LDFLAGS = -module -avoid-version -no-undefined $(WEB_EXTENSION_LIBS2) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.makefile .numberLines} -# File: configure.ac # - -AC_PREREQ([2.69]) -AC_INIT(ext,0.1,test@example.com) -AM_INIT_AUTOMAKE -AC_CONFIG_SRCDIR([ext.c]) -AC_PROG_CC -LT_INIT -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Put the above files in a new fresh directory and you are ready to see the -powers of autotools in action. - -Run the following commands on your pash prompt: - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.bash} -touch NEWS README AUTHORS ChangeLog -aclocal -autoconf -automake --add-missing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -After this steps, we end up with 18 files in our directory. Finally we -can _configure_, _build_ and _install_ our extension. The following -commands will probably look familiar. Note that the _configure_ step -generates 6 additional files, totaling in **24 files** before the actual -_make_ command is run. - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.bash} -./configure -make -make install -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... just to compile one **single C file**. |
