Makefile ã§ããããã¡ã¤ã«ã®ä¾åé¢ä¿ãæ¸ãã®ã¯çµæ§é¢åã§ããã以å㯠X ã«ä»å±ã® makedepend ã³ãã³ãã使ã£ã¦è¡ãã®ãæ®éã ã£ããã便å©ãªæ¹æ³ããªãã調ã¹ã¦ã¿ãã GNU make ã®ããã¥ã¢ã«ã«ãã¾ãã«ä¾åé¢ä¿ãèªåçæããæ¹æ³ãã®ãã®ããããã¦ããã 4.14 Generating Prerequisites Automatically ã«è©³ãã説æããããmake ã® info ã®æ¥æ¬èªè¨³ã GNU make æ¥æ¬èªè¨³(Coopç·¨) - ã«ã¼ã«ã®è¨è¿° ãããããããã«ãããã¦ãã Makefile ã®ã«ã¼ã«ãã®ã¾ã¾ã§ã¯åä½ããªãã£ããè±èªã®åæã®æ¹ã®ã«ã¼ã«ã«ããªãã¨åä½ããªããåã«å¼ç¨ç¬¦ã®å¯¾å¿é¢ä¿ãã¨ãã¦ããªãã ãã 以ä¸ã®ããã«ããã°ãããMakefile å ¨ä½ãä¹ãã¦ããã çæããã *.d ã include ããããã ããä¸çªæå㯠*.d ã¯åå¨ããªã
[ C++ã§éçº ] GNU makeã®ä½¿ãæ¹ æ´æ°æ¥ï¼ ï¼£++ã®ãã«ããGNU makeã§è¡ãã¾ãã Makefileè¨è¿°ãã³ãã¬ã¼ã åä¸ãã£ã¬ã¯ããªã§1ã¤ã®å®è¡ãã¡ã¤ã«ä½æç¨ Hello makefileï¼Ver.1) ä¸ã¤ã®srcãã£ã¬ã¯ããªãä¸ã¤ã®includeãã£ã¬ã¯ããªãããªãã½ã¼ã¹ãã¡ã¤ã«ãmakeããä¸ã¤ã®å®è¡ãã¡ã¤ã«ãä½æãã¾ãã PROGRAM = hello.exe SRCS = Hello.cc Main.cc OBJS = $(subst .cc,.o,$(SRCS)) RM := rm CXX := g++ CC := g++ CPPFLAGS = -I../include LDFLAGS = -mno-cygwin $(PROGRAM): $(OBJS) $(LINK.o) $^ $(LOADLIBES) -o $@ .PHONY: clean clean:
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}