Help! with makefiles

i 've a little problem:
I don’t know how i have to do to creat the makefile to compile an OpenGL/C code who run on linux.
thank you.

Here is the documentation for make and Makefiles:
http://www.gnu.org/manual/make/index.html

Have fun.

hi

there is also another tool called “tmake” from trolltech. it is for various platforms and free.
http://www.trolltech.com/products/download/freebies/tmake.html

you can build up your own projects - which compiling and linking options, and so on - and extend them as you wish. i just started to use it and i can’t give you much details about it, but i think there is many more to it then i know right now.

martin

…don’t know how i have to do to creat the makefile to compile an OpenGL/C code who run on linux.
thank you.[/b]

This is what I use. For example, if the source code is cube.c, all I type at the promt is make cube. This makes an exe from the source.
Here ya go:
[b]
INCLUDE = -I/usr/X11R6/include/
LIBDIR = -L/usr/X11R6/lib

COMPILERFLAGS = -Wall
CC = gcc
CFLAGS = (COMPILERFLAGS) (INCLUDE)
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm

.Suffixes: this .Suffixes: .c .c: (LIB_DEP)
(CC) (CFLAGS) -o @ (LIBDIR) < (LIBRARIES)
[/b]

Hope this helps someone!
Shalom,
JBob

BTW, please ignore html tags above

Thanks!

>Hope this helps someone!

thanks JBob.

Hi,

I used your makefile to compile, but i get this error:

[wizzard@michiel bounce]$ make bounce
makefile:12: *** missing separator. Stop.

Can you help me??

Regards,
Michiel

[wizzard@michiel bounce]$ make bounce
makefile:12: *** missing separator. Stop.

… muffling my guffaws at your choice of user name …

Line 12 needs to start with a TAB character.

You probably want to read http://www.gnu.org/manual/make/index.html before doing anything else.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.