# $Id$
# --------------------------------------------------------------
# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------

name := LEMuSR
G4TARGET := $(name)
G4EXLIB := true

ifndef G4INSTALL
  G4INSTALL = ../
endif

.PHONY: all
all: lib bin

include $(G4INSTALL)/config/architecture.gmk

include $(G4INSTALL)/config/binmake.gmk

########################### TRIUMF ###############################
#CPPFLAGS += -I$(G4INSTALL)/spintest/triumf/spintest/include

########################### ROOT #################################
ifdef ROOTSYS
ifndef G4UI_USE_ROOT
CPPFLAGS += -DG4ANALYSIS_USE_ROOT $(shell $(ROOTSYS)/bin/root-config --cflags)
ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --nonew --glibs) -lMinuit -lHtml
ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS))
ROOTLIBS := $(filter-out -lThread,$(ROOTLIBS))
ROOTLIBS := $(filter-out -lpthread,$(ROOTLIBS))
LDLIBS += $(ROOTLIBS)
endif
endif

ifdef ASYM_USE_LEMU
CPPFLAGS += -DASYM_USE_LEMU
endif

ifdef LEMU_TEST_ASYM	
CPPFLAGS += -DLEMU_TEST_ASYM
endif

ifdef LEMU_TEST_FIELD
CPPFLAGS += -DLEMU_TEST_FIELD
endif

ifdef LEMU_TEST_CFOIL
CPPFLAGS += -DLEMU_TEST_CFOIL
endif

ifdef LEMU_TEST_FOCAL_LENGTH	
CPPFLAGS += -DLEMU_TEST_FOCAL_LENGTH
endif

ifdef G4SRVERBOSE
CPPFLAGS += -DG4SRVERBOSE
endif

ifdef DEBUG_INTERPOLATING_FIELD
CPPFLAGS += -DDEBUG_INTERPOLATING_FIELD
endif

ifdef NO_CFOIL
CPPFLAGS += -DNO_CFOIL
endif

ifdef LEMU_GET_NEWMAPS
CPPFLAGS += -DLEMU_GET_NEWMAPS
endif

ifdef LEMU_TRANSVERSE_FIELD
CPPFLAGS += -DLEMU_TRANSVERSE_FIELD
endif
