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) intersect.o  
OBJ1 = Point3.o Vector3.o XYZ.o 
 
#$< evaluates to the target's dependencies,
#$@ evaluates to the target
 
$(PROG): $(OBJS) $(OBJ1) 
	$(CC) -o $@ $(OBJS) $(OBJ1)   
 
$(OBJS):
	$(CC) -c  $*.cpp $(INCLS) 

$(OBJ1):
	$(CC) -c $*.cpp                                                                                
clean:
	rm $(PROG).o 

