# /*************************************************************************** # -------------------------------------------------------------------------- # Sample Makefile for the computer exercises # Exercise ROOT Introduction # -------------------------------------------------------------------------- # 13.06.2005, Klaus Rabbertz # # modification log: # kr, 28.06.2006: Removed explicit ex09 naming # ***************************************************************************/ # Get the correct root configuration ROOTCFLAGS := $(shell root-config --cflags) ROOTLIBS := $(shell root-config --libs) ROOTGLIBS := $(shell root-config --glibs) # Set the compiler options CXX = g++ #use g++ as compiler CXXFLAGS = -g -O -Wall -fPIC #set compiler options #-g compile with debug information #-O optimize #-Wall show warnings for everything #-fPIC compile source file as sharable object # Set the linker options LD = g++ #use g++ for linking LDFLAGS = -O SOFLAGS = -shared ####################### CXXFLAGS += $(ROOTCFLAGS) LIBS = $(ROOTLIBS) $(SYSLIBS) GLIBS = $(ROOTGLIBS) $(SYSLIBS) #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # By default, compile template for exercise 9 default: gauss # Compile solution as well all: gauss gauss_lsg #------------------------------------------------------------------------------ # Template gauss.o: gauss.cc $(CXX) $(CXXFLAGS) -c gauss.cc -o gauss.o gauss: gauss.o $(LD) $(LDFLAGS) gauss.o $(LIBS) -o gauss #------------------------------------------------------------------------------ # Solution gauss_lsg.o: gauss_lsg.cc $(CXX) $(CXXFLAGS) -c gauss_lsg.cc -o gauss_lsg.o gauss_lsg: gauss_lsg.o $(LD) $(LDFLAGS) gauss_lsg.o $(LIBS) -o gauss_lsg #------------------------------------------------------------------------------ #Clean up clean: @rm -f *.o core