Monday, July 23, 2012

Installing openGL on Fedora 17

Steps to install openGL on fedora 17:
Installing:
 $sudo yum install freeglut-devel build-essential  
Compiling sample program:
  1. Get sample programs from SAMPLE  PROGRAMMS
  2. Makefile:
 LDFLAGS=-lglut -lGL -lGLU -lX11 -lm  
 INCLUDES=-I/usr/include  
 LIBS=-I/usr/lib  
 CC=gcc  
 SOURCES=wave.c teapot.c logo.c  
 TARGETS=$(SOURCES:.c= )  
 DEPS=  
 OBJS=$(SOURCES:.c=.o)  
 %.o: %.c $(DEPS)   
  $(CC) -c -o $@ $< $(INCLUDES) $(LIBS) $(LDFLAGS)  
 wave: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 teapot: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 logo: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 .PHONY: clean  
 clean:  
  rm -f $(OBJS) $(TARGETS)  
E.g. Compiling  wave.c
 $make wave  
Running program:
E.g. To run wave.c program
 $./wave  
             

0 comments:

Post a Comment