ä»çµã¿ãå¤ã£ã¦ãã¾ãã° Makefile ã¯ç°¡æ½ã«æ¸ãã¾ãï¼$(CC) ã¨ã $@ ã¨ã $< ãªãã¦å¤æ°ã¯ä½¿ã£ããè² ãã§ãï¼ åºæ¬(ãã®1) ã½ã¼ã¹ã³ã¼ã hoge.c ãã å®è¡å½¢å¼ã®ãã¤ã㪠hoge ãçæããMakefileã¯ï¼ä»¥ä¸ã®ããã«æ¸ãã¾ããã all: hogeããã ãã§ãï¼ãã㧠$ make all ã¨ãã㨠hoge ãçæããã¾ã éè¦ãªç¹ã¯ï¼ééã£ã¦ã all: hoge hoge: hoge.c $(CC) hoge.c -o hogeã®ãããªMakefileãæ¸ããªããã¨ã§ãï¼ãã®ãããªMakefileã§ã¯ #!/bin/sh CC=gcc $CC hoge.c -o hoge ã¨ãããããªã·ã§ã«ã¹ã¯ãªããã¨åç¨åº¦ã®ä½¿ãåæããããã¾ããï¼ åºæ¬(ãã®2) ããã§ä¾ãã°-O3 ãä»ãã¦ã³ã³ãã¤ã«ãããå ´åãï¼-lm ãä»ãã¦ãªã³ã¯ãããå ´åã¯ä»¥ä¸ã®ããã«ã
{{#tags}}- {{label}}
{{/tags}}