PDA

View Full Version : help! with makefiles.



strikerone
06-07-2001, 06:46 AM
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.

rts
06-07-2001, 07:14 AM
Here is the documentation for make and Makefiles:
http://www.gnu.org/manual/make/index.html

Have fun.

martinzwigl
06-07-2001, 08:11 AM
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

JBob
06-10-2001, 04:26 AM
..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:

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)


Hope this helps someone!
Shalom,
JBob

JBob
06-10-2001, 04:28 AM
BTW, please ignore html tags above
http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks!

jmg
06-14-2001, 03:22 PM
>Hope this helps someone!

thanks JBob. http://www.opengl.org/discussion_boards/ubb/smile.gif

04-24-2002, 08:34 AM
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

rts
04-24-2002, 08:37 PM
[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.