
{"id":195,"date":"2015-06-26T19:58:24","date_gmt":"2015-06-26T19:58:24","guid":{"rendered":"http:\/\/timallen.name\/?p=195"},"modified":"2016-01-07T16:22:57","modified_gmt":"2016-01-07T16:22:57","slug":"autohell-automake","status":"publish","type":"post","link":"https:\/\/timallen.name\/index.php\/2015\/06\/26\/autohell-automake\/","title":{"rendered":"AutoHell (automake)"},"content":{"rendered":"<p><b>Intro<\/b><br \/>\nI have been writing my own Makefiles for years. Lately I&#8217;ve been experimenting with using automake. I have used automake to compile various things from source for years. It&#8217;s a formidable beast but then again so was make and getting vim to work the way _I_ want, but those have proven well worth the effort, we&#8217;ll see&#8230;<\/p>\n<p><b>run autoscan<\/b><br \/>\nThis generates autoscan.log which you probably don&#8217;t care about and configure.scan which you will edit and rename to configure.ac<\/p>\n<p><b>edit configure.scan and rename to configure.ac<\/b><br \/>\nadd AC_INIT, AC_INIT_AUTOMAKE and AC_OUTPUT<br \/>\nexample:<br \/>\n<code style=\"font-size: 60%\"><br \/>\nAC_INIT(magtek, 0.1, tallen@integsys.biz)<br \/>\nAM_INIT_AUTOMAKE<br \/>\nAC_OUTPUT(Makefile src\/Makefile)<br \/>\n<\/code><\/p>\n<p><b>run aclocal<\/b><\/p>\n<p><b>run autoconf<\/b><\/p>\n<p><b>create\/edit Makefile.am<\/b><br \/>\n<code style=\"font-size: 60%\"><br \/>\nAUTOMAKE_OPTIONS = foreign<br \/>\nSUBDIRS = src<br \/>\n<\/code><br \/>\nforeign means non GNU<br \/>\nSUBDIRS could include things like src, doc, examples, man, scripts<\/p>\n<p><b>create\/edit src\/Makefile.am<\/b><br \/>\n<code style=\"font-size: 60%\"><br \/>\nAM_CXXFLAGS=-g -I\/usr\/include\/libusb-1.0 -lusb-1.0<br \/>\nLDADD = \/usr\/lib\/x86_64-linux-gnu\/libusb-1.0.so<br \/>\nAM_ETAGSFLAGS = -R --c++-kinds=+p --fields=+iaS --extra=+q --if0=yes . \/usr\/include\/libusb-1.0\/<\/p>\n<p>bin_PROGRAMS = enumerate magtek<br \/>\nenumerate_SOURCES = enumerate.cc<br \/>\nmagtek_SOURCES = magtek.cc<br \/>\n<\/code><br \/>\nAM_CXXFLAGS adds will show up as CXXFLAGS in the generated Makefile<br \/>\nLDADD is library thats not mainstream required for this project<br \/>\nAM_ETAGSFLAGS are the flags for the tags target in the generated Makefile<br \/>\nthe rest is for your targets and their dependencies<\/p>\n<p><b>run autoheader<\/b><br \/>\n<b>run automake &#8211;add-missing<\/b><br \/>\n<b>run autoconf<\/b><br \/>\n<b>run .\/configure<\/b><br \/>\n<b>run make<\/b><\/p>\n<p>I used <a href=\"http:\/\/mij.oltrelinux.com\/devel\/autoconf-automake\/\">this page<\/a> and naturally <a href=\"https:\/\/www.gnu.org\/software\/automake\/manual\/html_node\/index.html#Top\">the documentation<\/a> as a basis for working this out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intro I have been writing my own Makefiles for years. Lately I&#8217;ve been experimenting with using automake. I have used automake to compile various things from source for years. It&#8217;s a formidable beast but then again so was make and getting vim to work the way _I_ want, but those have proven well worth the &hellip; <a href=\"https:\/\/timallen.name\/index.php\/2015\/06\/26\/autohell-automake\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">AutoHell (automake)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-posoncloud"],"_links":{"self":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":6,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":212,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions\/212"}],"wp:attachment":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}