50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
#---------------------------------------------------
|
|
# get compilation and library flags from root-config
|
|
|
|
ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
|
|
ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs)
|
|
|
|
#---------------------------------------------------
|
|
|
|
CXX = g++
|
|
CXXFLAGS = -g -O3 -Wall
|
|
LOCALINCLUDE =
|
|
ROOTINCLUDE = $(ROOTSYS)/include
|
|
INCLUDES = -I$(ROOTINCLUDE)
|
|
LD = g++
|
|
LDFLAGS = -O
|
|
|
|
# the output from the root-config script:
|
|
CXXFLAGS += $(ROOTCFLAGS)
|
|
LDFLAGS +=
|
|
|
|
# the ROOT, BMW, and MUSR libraries
|
|
LIBS = $(ROOTLIBS) -lXMLParser -lMathMore -lBMWtools -lFitPofB -lfftw3 -lfftw3f -fopenmp -lm -lPMusr
|
|
|
|
EXEC = simDataFullSpec
|
|
|
|
# some definitions: headers, sources, objects,...
|
|
OBJS =
|
|
OBJS += $(EXEC).o
|
|
|
|
# make the executable:
|
|
#
|
|
all: $(EXEC)
|
|
|
|
$(EXEC): $(OBJS)
|
|
@echo "---> Building $(EXEC) ..."
|
|
$(LD) $(LDFLAGS) $(OBJS) -o $(EXEC) $(LIBS)
|
|
@echo "done"
|
|
|
|
# clean up: remove all object file (and core files)
|
|
# semicolon needed to tell make there is no source
|
|
# for this target!
|
|
#
|
|
clean:; @rm -f $(OBJS)
|
|
@echo "---> removing $(OBJS)"
|
|
|
|
#
|
|
$(OBJS): %.o: %.cpp
|
|
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
|
|
|