SHELL = /bin/sh
# decide on compiler and flags depending on host
CC = gcc
CFLAGS=-fPIC -pthread
ALL_CFLAGS = -Wall -06 $(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./
EXE = CheckGeom.exe
# pattern rule to compile object files from C files
# might not work with make programm other than GNU make
%.o :  %.C Makefile
	$(CC) $(ALL_CFLAGS) $(INCS) -c $< -o $@

#all: $(EXE)


OBJS = CheckGeom.o
CheckGeom.exe: $(OBJS) Makefile
	$(CC) $(ALL_CFLAGS) $(INCS) $(OBJS) $(LIBS) -o CheckGeom.exe
	
.PHONY : clean
clean:
	rm -f *.o *.exe
