SHELL = /bin/sh
# decide on compiler and flags depending on host
CC = gcc
CFLAGS=-fPIC -pthread
ALL_CFLAGS = -Wall -O6 $(CFLAGS)
VPATH=$(PAM_LIB)

LIBS = $(PAM_LIB)/libyoda.so $(PAM_LIB)/libDarthVader.so $(PAM_LIB)/libPamLevel2.so  `root-config --cflags --glibs` 
INCS =-I `root-config --incdir`  -I$(PAM_INC) -I$(PAM_INC)/yoda/ -I./ 
SRCS = TrAng.cpp option.cpp
EXE = QtoInclination.exe 
# pattern rule to compile object files from C files
# might not work with make programs other than GNU make
%.o :  %.C Makefile
	$(CC) $(ALL_CFLAGS) $(INCS) -c $< -o $@  

all: $(EXE)


OBJS =QtoInclination.o 
QtoInclination.exe: $(OBJS) Makefile
	$(CC) $(ALL_CFLAGS) $(SRCS) $(INCS) $(OBJS) $(LIBS) -o QtoInc.exe

#OBJS0 = Loop.o My-Selection-0.o My-Histos-0.o
#Loop-0.exe: $(OBJS0) Makefile
#	$(CC) $(ALL_CFLAGS) $(INCS) $(OBJS0) $(LIBS) -o Loop-0.exe

#OBJS1 = Loop.o Selection-none.o Histo-test.o
#Loop-1.exe: $(OBJS1) Makefile
#	$(CC) $(ALL_CFLAGS) $(INCS) $(OBJS1) $(LIBS) -o Loop-1.exe


.PHONY : clean
clean:
	rm -f *.o *.exe
