aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 1bb75c535afe1ed3f1f9750873f6015d1c512110 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
              

                      




                                                       

                             









                                      








                                                                 
                                  
        
                                   


                                      





                                               
                          
                        
                                       
CXX      = g++
CXXFLAGS = -g -Imeowpp

ASCIIDOC       = asciidoc
ASCIIDOC_FLAGS = -a toc2 -a data-uri -a max-width=70em\
         -b html5 \
         --theme=volnitsky

README      = README.asciidoc
README_HTML = README.html

TEST  = _test
TESTS = meowpp



all: $(TESTS)

readme:
    ./readme_generate.py $(README)
    $(ASCIIDOC) $(ASCIIDOC_FLAGS) -o $(README_HTML) $(README)
    
$(TEST)/meowpp: $(TEST)/meowpp.o \
    $(TEST)/meowpp_Colors.o \
    $(TEST)/meowpp_DisjointSet.o \
    $(TEST)/meowpp_KD_Tree.o \
    $(TEST)/meowpp_SegmentTree.o \
    $(TEST)/meowpp_MergeableHeap.o \
    $(TEST)/meowpp_SplayTree.o \
    $(TEST)/meowpp_VP_Tree.o \
    
    $(CXX) -o $@ $(CXXFLAGS) $^
    
%.o: %.cpp
    $(CXX) -c -o $@ $(CXXFLAGS) $^

$(TESTS): %: $(TEST)/%
    $^

clean:
    -rm -f $(foreach i,$(TESTS),$(TEST)/$i)
    -rm -f $(TEST)/*.o
    -rm -f $(README)
    -rm -f $(README) $(README_HTML)