PROG=test1
CC=g++
INCLS	=  -I/usr/include   

#source codes
SRCS =   $(PROG).cpp 
#substitute .c by .o to obtain object filenames
OBJS = $(SRCS:.cpp=.o) 
OBJ1 = Point3.o Vector3.o XYZ.o  intersect.o
 
#$< evaluates to the target's dependencies,
#$@ evaluates to the target
 
$(PROG): $(OBJS) $(OBJ1) 
	$(CC) -o $@ $(OBJS) $(OBJ1)   
	$(CC) -o testvp testvp.cpp  $(OBJ1)   
	$(CC) -o ray-plane-test ray-plane-test.cpp  $(OBJ1)   
	$(CC) -o ray-triangle-test ray-triangle-test.cpp   $(OBJ1)   

$(OBJS):
	$(CC) -c  $*.cpp $(INCLS) 

$(OBJ1):
	$(CC) -c $*.cpp                                                                                
clean:
	rm *.o $(PROG); rm testvp ray-plane-test ray-triangle-test 

