#******************************************************************************\
#*******************************************************************************
#*******                                                                ********
#*****      Visual robot simulator makefile                               ******
#***                                                                        ****
#*          Author: Craig Dillon, Andrew Conway                               **
#*                                                                            **
#***                                                                        ****
#*****                                                                    ******
#*******                                                                ********
#*******************************************************************************
#******************************************************************************/

# for non-SGI machines, or to run with no graphics, uncomment lines:
COMPUTER = R_NOGRAPHICS
LIB = -lm

# COMPUTER = R_SGI
# LIB = -lm -lgl_s  -lX11_s

CC = cc -cckr
CFLAGS = -D$(COMPUTER)

OBJECTS = 	draw.o\
			dynamics.o\
			file.o\
			graph.o\
		 	main.o\
			matmul.o\
			newps.o\
			plan.o\
			run.o\
			save.o\
			schematic.o\
			user.o\
			windowlib.o

# COMPILING COMMANDS

rsim:	$(OBJECTS) 
		$(CC) -o rsim $(OBJECTS) $(LIB)

clean:
	/bin/rm *.o

# INTER-DEPENDANCY LIST (contains both .h and .o files)

draw.o:			$(SRC)draw.c $(INC)rob.h $(INC)schematic.h
dynamics.o:		$(SRC)dynamics.c $(INC)rob.h
file.o:			$(SRC)file.c $(INC)rob.h $(INC)schematic.h
graph.o:		$(SRC)graph.c $(INC)rob.h $(INC)windowlib.h $(INC)schematic.h
main.o:			$(SRC)main.c $(INC)rob.h $(INC)windowlib.h $(INC)schematic.h
matmul.o:		$(SRC)matmul.c $(INC)rob.h $(INC)schematic.h
newps.o:		$(SRC)newps.c $(INC)rob.h $(INC)schematic.h
plan.o:			$(SRC)plan.c $(INC)rob.h
run.o:			$(SRC)run.c $(INC)rob.h $(INC)schematic.h
save.o:			$(SRC)save.c $(INC)rob.h $(INC)schematic.h
schematic.o:	$(SRC)schematic.c $(INC)rob.h $(INC)schematic.h
user.o:			$(SRC)user.c $(INC)rob.h $(INC)schematic.h
windowlib.o:	$(SRC)windowlib.c $(INC)rob.h $(INC)windowlib.h
