# # The compiler and the flags it will use. # CC = cc OPTIMIZE= -O CFLAGS = $(OPTIMIZE) -I$ROOT/include -I/usr/local/include/glut -LD_MSG:info=31:off=31 LDFLAGS = $(OPTIMIZE) LIBS = -L$(ROOT)/lib -L/usr/local/lib32 -lglut -lGLU -lGL -lXmu -lXext -lX11 -lm # # Source files. Place all your .c files, but not your main program or .h files here. SRCS = OBJS = $(SRCS:.c=.o) MAINSRC = prog1.c # # TARGET is the name of the program to be created # TARGET = prog1 # # This rule tells how to change a generic .c file into a .o file; # the $< token is expanded into whatever .c file is working on. # .c.o: $(CC) $(CFLAGS) $(MFLAGS) -c $< all: $(TARGET) $(TARGET): $(CC) $(CFLAGS) $(MFLAGS) $(OBJS) -o $@ $(MAINSRC) $(LIBS) clean: -rm -f $(OBJS) core a.out *~ *.bak $(TARGET)