OpenGL makefile for Mac

Saturday, February 27, 2010

A sample make file:

-----------------------------------------------
# Initial entry
#
#

APPS = mainz

#OPT = -g
OPT = -O
ARCH = -m32
CFLAGS = $(OPT) $(ARCH)

# MAC needs frameworks
OPENGLLIBS = -L"/System/Library/Frameworks/OpenGL.framework/Libraries"
GLUTLIBS = -lGL -lGLU -lm -lobjc
FRAMEWORKS = -framework GLUT -framework OpenGL -framework glew

all: $(APPS)

mainz: textfile.c ogl.c
$(CC) $(CFLAGS) -o main $(FRAMEWORKS) $(OPENGLLIBS) $(GLUTLIBS) *.c

clean:
if (rm *~ $(APPS) TAGS) then :; fi

#EOF

0 comments: