Jump to content
  • Advertisement
Sign in to follow this  
AN_D_K

Makefile on LINUX GCC/G++

This topic is 4239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been struggling with this for a full day now. It's really annoying because the makefile used to work a couple of years ago perfectly well. I'm running this on a Ubuntu linux. Everything is installed correctly, because I can happily compile things from the command line. This is what I have so far: -
LIBS = -L/usr/X11R6/lib -lglut -lGL -lGLU -lXi -lXmu -lXext -lX11 -lm
COMPILE = g++ -c -o $@
DEL = rm -f
BUILD = g++ -o $@ $(LIBS)

PROJECT: Animation.o Camera.o HUD.o Light.o Lighting.o Particle.o RenderContext.o SceneData.o StorageTypes.o Texture.o Time.o VecMat.o Visualisation.o WorldModel.o
$(BUILD) project.cpp Animation.o Camera.o HUD.o Light.o Lighting.o Particle.o RenderContext.o SceneData.o StorageTypes.o Texture.o Time.o VecMat.o Visualisation.o WorldModel.o


Camera.o:	Camera.cpp Camera.h
		$(COMPILE) Camera.cpp
Animation.o:	Animation.cpp Animation.h
		$(COMPILE) Animation.cpp
HUD.o:		HUD.cpp HUD.h
		$(COMPILE) HUD.cpp
Light.o:	Light.cpp Light.h
		$(COMPILE) Light.cpp
Lighting.o:	Lighting.cpp Lighting.h
		$(COMPILE) Lighting.cpp
Particle.o:	Particle.cpp Particle.h
		$(COMPILE) Particle.cpp
RenderContext.o:RenderContext.cpp RenderContext.h
		$(COMPILE) RenderContext.cpp
SceneData.o:	SceneData.cpp SceneData.h
		$(COMPILE) SceneData.cpp
StorageTypes.o:	StorageTypes.cpp StorageTypes.h
		$(COMPILE) StorageTypes.cpp
Texture.o:	Texture.cpp Texture.h
		$(COMPILE) Texture.cpp
Time.o:	        Time.cpp Time.h
		$(COMPILE) Time.cpp
VecMat.o:	VecMat.cpp VecMat.h
		$(COMPILE) VecMat.cpp
Visualisation.o:Visualisation.cpp Visualisation.h
		$(COMPILE) Visualisation.cpp
WorldModel.o:	WorldModel.cpp WorldModel.h
		$(COMPILE) WorldModel.cpp
Whats not working is the $(BUILD) section. I get a "*** missing seperation. Stop" error. When I take it out the object files are created just fine. Anyone know how to fix this? NOTE: I know I should have a Clean: bit but first things first.

Share this post


Link to post
Share on other sites
Advertisement
oops, wrong board. Stupid login messed me up. Still, if you guys know then please help :)

Additional: Woo! Fast move. Good work

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!