PDA

View Full Version : how to use this file?



08-27-2002, 06:43 AM
the file content is as follows:
*********************************************
# Makefile for Win32 (nmake)

!include <win32.mak>

CFLAGS = $(cflags) $(cdebug) -DWIN32
LDLIBS = $(lflags) $(ldebug) glut.lib glu.lib opengl.lib $(guilibs)
CFILES = bounce.c glui.c trackball.c
TARGETS = bounce.exe
OBJECTS = $(CFILES:.c=.obj)

default : $(TARGETS)

clean :
@del *.obj
@del *~

clobber :
@del *.exe

$(TARGETS): $(OBJECTS)
$(link) -out:$@ $(OBJECTS) $(LDLIBS)
.c.obj :
$(CC) $(CFLAGS) $<

# dependencies (must come AFTER inference rules)
trackball.obj : trackball.h
$(OBJECTS) : glui.h
********************************************
I don't know what is the usage of this file,and how to use it .
I hope someone can help me with it.
thanks

killercow
08-27-2002, 06:54 AM
it's a make file silly! you use to make your program with. Basically if you have lots of header/source files a makefile makes it easier to compile the parts of the code that need to be compiled.

But in windows I'm not exactly sure how you'd use them. I think VC6 has some option to use them, and i'm pretty sure dev-c++ does too, but I've never done it so i'm not much help.

08-27-2002, 08:19 AM
i have tested a command 'nmake' in the directory of bin(vc) like this: nmake Makefile.win
but i got an error.it's said the file win32.mak can not be found.
what's the problem? please help !
thanks a lot!

DFrey
08-27-2002, 11:44 AM
This looks like an old make file. Virtually no one making an app for Win32 would use glu.lib, glut.lib, or opengl.lib. You might if you were using SGI's old software implementation though. Since you have VC, I'd just make a console project, add the source files to the project, and set it to link in glu32.lib, glut32.lib, and opengl32.lib. Then build the thing.

08-28-2002, 05:41 AM
Also, it seems that it is looking for another makefile that is included at the top of the one you sent. You would need to put that in the same directory or where the compiler would expect to find it. I assume that it would contain the win32 specific libraries and include files for the project being compiled.

Tina