码迷,mamicode.com
首页 > 其他好文 > 详细

Makefile for CPolyn.cpp

时间:2017-03-22 00:02:37      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:makefile   -o   logs   sub   pat   src   ++   targe   efi   

 

 1 INCLUDEPATH=-I/usr/include/c++/4.8.4 2             -I./
 3 SOURCEDIR=./ 
 4 LIBRARYPATH:=
 5 LIBRARY:=
 6 SRCS=$(foreach dir,$(SOURCEDIR), $(wildcard $(dir)/*.cpp))
 7 TEMPOUTPUT:=$(foreach dir,$(SOURCEDIR), $(wildcard $(dir)/*.o))
 8 OBJECTS:=$(patsubst %.cpp,%.o,$(SRCS))
 9 TARGETS:=$(notdir $(PWD))
10 
11 .SUFFIXES:.o .cpp
12 %.o:%.cpp
13     $(CXX) $(INCLUDEPATH) -g -c -o $@ $< $(LIBRARYPATH) $(LIBRARY)
14 
15 all:$(TARGETS)
16 
17 $(TARGETS):$(OBJECTS)
18     $(CXX) $(INCLUDEPATH) -g -o $@ $^ $(LIBRARYPATH) $(LIBRARY)
19 
20 run:
21     ./$(TARGETS)
22 
23 clean:
24     rm -rf $(TARGETS)
25     rm -rf $(TEMPOUTPUT)

 

Makefile for CPolyn.cpp

标签:makefile   -o   logs   sub   pat   src   ++   targe   efi   

原文地址:http://www.cnblogs.com/ILoveOCT/p/6597228.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!