{"id":116,"date":"2009-01-29T13:26:07","date_gmt":"2009-01-29T13:26:07","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/01\/29\/makefile\/"},"modified":"2021-02-27T09:55:39","modified_gmt":"2021-02-27T09:55:39","slug":"makefile","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/","title":{"rendered":"Makefile &#8211; Makefile example &#8211; Makefile Guide"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3983\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png\" alt=\"makefile-example\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Note that this example <\/strong><strong>Makefile is from an older software project, which specifies everything within each <\/strong><strong>makefile<\/strong> rather than using any recursive or inclusion-based <strong>makefile hierarchy, and is presented here for the purposes of the C intro project only. It is modified from the original for the purposes of the C intro project. <\/strong><\/p>\n<pre><strong>CC=             gcc\r\nCFLAGS=         -Wall -O2 \r\nLFLAGS+=<\/strong><\/pre>\n<p>SRCS= cas.c \\<br \/>\nclient.c \\<br \/>\nhashtable_itr.c<\/p>\n<p>OBJS= ${SRCS:.c=.o}<\/p>\n<p>all: libmarquis.a libmarquis.so<\/p>\n<p>clean:<br \/>\nrm -f libmarquis.a libmarquis.so *.o<\/p>\n<p>libmarquis.a: ${OBJS}<br \/>\nar -r $@ ${OBJS}<\/p>\n<p>libmarquis.so:${OBJS}<br \/>\n${CC} -shared ${CFLAGS} -fPIC -Wl,-soname,libmarquis.so -o $@ \\<br \/>\n${OBJS}<\/p>\n<p>.c.o:<br \/>\n${CC} ${CFLAGS} -c $&lt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note that this example Makefile is from an older software project, which specifies everything within each makefile rather than using [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3983,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[71],"tags":[2876,2971,2963,2967,2968,2965,2964,2969,2970,2966],"class_list":["post-116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-makefile","tag-build-tool","tag-c-intro-project","tag-makefile","tag-makefile-example","tag-makefile-guide","tag-makefile-instruction","tag-makefile-overview","tag-makefile-tutorial","tag-simple-makefile","tag-what-is-makefile"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Makefile - Makefile example - Makefile Guide - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Makefile - Makefile example - Makefile Guide - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Note that this example Makefile is from an older software project, which specifies everything within each makefile rather than using [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2009-01-29T13:26:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:55:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Makefile &#8211; Makefile example &#8211; Makefile Guide\",\"datePublished\":\"2009-01-29T13:26:07+00:00\",\"dateModified\":\"2021-02-27T09:55:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/\"},\"wordCount\":111,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2009\\\/01\\\/makefile.png\",\"keywords\":[\"Build tool\",\"C intro project\",\"Makefile\",\"Makefile example\",\"Makefile Guide\",\"Makefile Instruction\",\"Makefile Overview\",\"Makefile Tutorial\",\"Simple Makefile\",\"What is Makefile\"],\"articleSection\":[\"makefile\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/\",\"name\":\"Makefile - Makefile example - Makefile Guide - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2009\\\/01\\\/makefile.png\",\"datePublished\":\"2009-01-29T13:26:07+00:00\",\"dateModified\":\"2021-02-27T09:55:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2009\\\/01\\\/makefile.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2009\\\/01\\\/makefile.png\",\"width\":600,\"height\":400,\"caption\":\"makefile-example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/makefile\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Makefile &#8211; Makefile example &#8211; Makefile Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Makefile - Makefile example - Makefile Guide - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/","og_locale":"en_US","og_type":"article","og_title":"Makefile - Makefile example - Makefile Guide - scmGalaxy","og_description":"Note that this example Makefile is from an older software project, which specifies everything within each makefile rather than using [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/","og_site_name":"scmGalaxy","article_published_time":"2009-01-29T13:26:07+00:00","article_modified_time":"2021-02-27T09:55:39+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Makefile &#8211; Makefile example &#8211; Makefile Guide","datePublished":"2009-01-29T13:26:07+00:00","dateModified":"2021-02-27T09:55:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/"},"wordCount":111,"commentCount":1,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png","keywords":["Build tool","C intro project","Makefile","Makefile example","Makefile Guide","Makefile Instruction","Makefile Overview","Makefile Tutorial","Simple Makefile","What is Makefile"],"articleSection":["makefile"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/","name":"Makefile - Makefile example - Makefile Guide - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png","datePublished":"2009-01-29T13:26:07+00:00","dateModified":"2021-02-27T09:55:39+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/makefile.png","width":600,"height":400,"caption":"makefile-example"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/makefile\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Makefile &#8211; Makefile example &#8211; Makefile Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":3984,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/116\/revisions\/3984"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/3983"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}