Soldato
- Joined
- 4 May 2006
- Posts
- 3,361
- Location
- Manchester
Ok, so my assignment needs to be compiled on Linux, and I know very little about Makefiles.
My current makefile looks like this
I need to link in a BMP loader, called BmpImage.cpp
I've included the .h file in the Cannon.cpp class, but I've no idea how to modify my makefile to link the library in.
Any help would be greatly appriciated.
My current makefile looks like this
Code:
LIBS = -lX11 -lglut -lGLU -lm
INCDIRS = -I/usr/include -I/usr/X11R6/include/ -I.
LIBDIRS = -L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib
CC = gcc
CCC = gcc
clean:
rm *.o
Cannon.o:Cannon.cpp
$(CC) $(INCDIRS) -g -c $*.cpp -o $*.o
Cannon:Cannon.o
$(CC) $(CFLAGS) -o $@ $< $(LIBDIRS) $(LIBS)
I need to link in a BMP loader, called BmpImage.cpp
I've included the .h file in the Cannon.cpp class, but I've no idea how to modify my makefile to link the library in.
Any help would be greatly appriciated.