首页 > 代码库 > Makefile for Boost Array Test

Makefile for Boost Array Test

 

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

 

Makefile for Boost Array Test