• makefile
  • こんな感じで書く。
    //----------Makefile--------------------------
    ROOTCFLAGS    = $(shell root-config --cflags)
    ROOTLIBS      = $(shell root-config --libs)
    ROOTGLIBS     = $(shell root-config --glibs)
    
    CXXFLAGS      = -O -Wall -fPIC
    CXXFLAGS     += $(ROOTCFLAGS)
    
    .SUFFIXES: .cxx .o .so
    
    all: trace
    
    trace:        trace.o FDC4.o
                    g++ -O trace.o FDC4.o $(ROOTLIBS) -o trace
    
    clean:
                    @rm -f trace.o FDC4.o core
    
    .cxx.o:
            g++ $(CXXFLAGS) -c $<
    //--------------------------------------------