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.
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
..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
BTW, please ignore html tags above
http://www.opengl.org/discussion_boards/ubb/smile.gif
Thanks!
>Hope this helps someone!
thanks JBob. http://www.opengl.org/discussion_boards/ubb/smile.gif
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.