{"id":6710,"date":"2020-03-18T14:15:14","date_gmt":"2020-03-18T06:15:14","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6710"},"modified":"2022-05-18T17:26:36","modified_gmt":"2022-05-18T09:26:36","slug":"make","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/make","title":{"rendered":"make\u547d\u4ee4 – \u7f16\u8bd1\u5185\u6838\u6216\u6e90\u7801\u6587\u4ef6"},"content":{"rendered":"\n

make\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u7f16\u8bd1\u5185\u6838\u6216\u6e90\u7801\u6587\u4ef6\u3002make\u662fGNU\u5de5\u7a0b\u5316\u7f16\u8bd1\u5de5\u5177\uff0c\u7528\u4e8e\u7f16\u8bd1\u4f17\u591a\u76f8\u4e92\u5173\u8054\u7684\u6e90\u4ee3\u7801\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u7f16\u8bd1\u5185\u6838\u6216\u6a21\u5757\u529f\u80fd\uff0c\u4ee5\u5de5\u7a0b\u5316\u7684\u5de5\u4f5c\u65b9\u5f0f\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n\n\n\n

\u521d\u6b21\u8fd0\u884cmake\u547d\u4ee4\u65f6\uff0c\u5b83\u4f1a\u901a\u8fc7\u626b\u63cfMakefile\u6587\u4ef6\u627e\u5230\u76ee\u6807\u53ca\u5176\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u5728\u5efa\u7acb\u4f9d\u8d56\u5173\u7cfb\u540e\u4f9d\u6b21\u7f16\u8bd1\u6240\u5bf9\u5e94\u7684\u6e90\u7801\u7a0b\u5e8f\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:\u00a0<\/strong> make [\u53c2\u6570] \u6587\u4ef6<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong> <\/p>\n\n\n\n

-r<\/td>\u7981\u7528\u5185\u7f6e\u7684\u9690\u542b\u89c4\u5219<\/td><\/tr>
-B<\/td>\u59cb\u7ec8\u65e0\u6761\u4ef6make\u6240\u6709\u76ee\u6807<\/td><\/tr>
-b<\/td>\u5ffd\u7565\u517c\u5bb9\u6027<\/td><\/tr>
-C<\u76ee\u5f55><\/td>\u66f4\u6539\u4e3a\u6307\u5b9a\u76ee\u5f55<\/td><\/tr>
-L<\/td>\u5728\u7b26\u53f7\u94fe\u63a5\u548c\u76ee\u6807\u4e4b\u95f4\u4f7f\u7528\u6700\u540e\u7684\u4fee\u6539\u65f6\u95f4<\/td><\/tr>
-n<\/td>\u5b9e\u9645\u4e0a\u4e0d\u8fd0\u884c\u4efb\u4f55\u547d\u4ee4\uff0c\u53ea\u663e\u793a\u51fa\u6765<\/td><\/tr>
-o<\u6587\u4ef6><\/td>\u4e0d\u7f16\u8bd1\u6307\u5b9a\u7684\u6587\u4ef6<\/td><\/tr>
-e<\/td>\u73af\u5883\u53d8\u91cf\u8986\u76d6makefile<\/td><\/tr>
-d<\/td>\u663e\u793a\u6253\u5370\u8c03\u8bd5\u4fe1\u606f<\/td><\/tr>
-i<\/td>\u4ece\u547d\u4e2d\u5ffd\u7565\u9519\u8bef<\/td><\/tr>
-w<\/td>\u663e\u793a\u5f53\u524d\u76ee\u5f55<\/td><\/tr>
-t<\/td>\u521b\u5efa\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u6539\u9020\u5b83\u4eec<\/td><\/tr>
-p<\/td>\u663e\u793amake\u7684\u5185\u90e8\u6570\u636e\u5e93<\/td><\/tr>
-q<\/td>\u5b89\u9759\u6a21\u5f0f<\/td><\/tr>
-R<\/td>\u7981\u7528\u5185\u7f6e\u53d8\u91cf\u8bbe\u7f6e<\/td><\/tr>
-s<\/td>\u4e0d\u56de\u663e\u547d\u4ee4<\/td><\/tr>
-I<\u76ee\u5f55><\/td>\u641c\u7d22\u6307\u5b9a\u76ee\u5f55\u4e2d\u5305\u542b\u7684makefile<\/td><\/tr>
-f<\u6587\u4ef6><\/td>\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u4f5c\u4e3amakefile\u6587\u4ef6<\/td><\/tr>
-k<\/td>\u5f53\u6709\u4e9b\u76ee\u6807\u4e0d\u80fdmake\u4e0b\u53bb\u65f6\uff0c\u7ee7\u7eed\u6267\u884c<\/td><\/tr>
-- -debug=<\u6807\u8bb0><\/td>\u663e\u793a\u8c03\u8bd5\u4fe1\u606f\u7684\u5404\u79cd\u7c7b\u578b<\/td><\/tr>
-j<\u4f5c\u4e1a\u7f16\u53f7><\/td>\u6307\u5b9a\u5de5\u4f5c\u7f16\u53f7\u7684\u4f5c\u4e1a\u4e00\u6b21\u5b8c\u6210<\/td><\/tr>
-l<\u8d1f\u8f7d><\/td>\u4e0d\u8981\u542f\u52a8\u591a\u4e2a\u4efb\u52a1\uff0c\u9664\u975e\u4f4e\u4e8e\u6307\u5b9a\u8d1f\u8f7d<\/td><\/tr>
-S<\/td>\u5173\u95ed-k<\/td><\/tr>
-- -no-print-directory<\/td>\u5173\u95ed-w\uff0c\u5373\u4f7f\u5b83\u88ab\u6253\u5f00<\/td><\/tr>
-- -warn-undefined-variables<\/td>\u5f53\u4e00\u4e2a\u672a\u5b9a\u4e49\u7684\u53d8\u91cf\u88ab\u5f15\u7528\u65f6\u53d1\u51fa\u8b66\u544a<\/td><\/tr>
-W<\u6587\u4ef6><\/td>\u6307\u5b9a\u76ee\u6807\u6587\u4ef6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u7f16\u8bd1\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u7684\u5de5\u7a0b\u6e90\u7801\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# make<\/strong><\/pre>\n\n\n\n

\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u4f5c\u4e3aMakefile\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# make -f makefile<\/strong><\/pre>\n\n\n\n

\u4e3amake\u547d\u4ee4\u63d0\u4f9b\u6307\u5b9a\u7684\u4e0d\u540c\u76ee\u5f55\u8def\u5f84\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# make -C \/linux<\/strong><\/pre>\n\n\n\n

\u663e\u793a\u5168\u90e8\u7684\u8c03\u8bd5\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# make -d <\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

make\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u7f16\u8bd1\u5185\u6838\u6216\u6e90\u7801\u6587\u4ef6\u3002make\u662fGNU\u5de5\u7a0b\u5316\u7f16\u8bd1\u5de5\u5177\uff0c\u7528\u4e8e\u7f16\u8bd1\u4f17\u591a\u76f8\u4e92\u5173\u8054\u7684\u6e90\u4ee3\u7801\u6587\u4ef6\uff0c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6710"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6710"}],"version-history":[{"count":17,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6710\/revisions"}],"predecessor-version":[{"id":9863,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6710\/revisions\/9863"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}