Steps to install openGL on fedora 17:
Installing:
E.g. Compiling wave.cInstalling:
$sudo yum install freeglut-devel build-essential
Compiling sample program:
- Get sample programs from SAMPLE PROGRAMMS
- 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)
$make wave
Running program:E.g. To run wave.c program
$./wave
0 comments:
Post a Comment