MinGW "Folder" Library Linking

I'm on Windows ("Windows Programming") and I've installed MinGW.
I downloaded boost libraries, and they work perfectly on Code::Blocks, but I need to link all libs from boost\stage\lib MANUALLY, using the command line. How can I do that?
Use a makefile. Edit this as you need, and simply call mingw32-make every time you want to build the program, and use mingw32-make clean to clear your object files (if you want to rebuild).

# Just call this "Makefile" (Exactly, without quotes)

#some programs
CPP = g++
RM = del

# your source files, with .o e.g.
OBJ = main.o other.o hi/hi.o
BIN = nameOfProgram.exe

CXXFLAGS = -I"/path/to/boost" #other things you need
LDFLAGS = -L"/path/to/boost" #other things you need, you might not need this

#note from here, long spaces HAVE to be tabs
all: $(BIN)
	@echo Program build, running...

$(BIN): $(OBJ)
	$(CPP) $(OBJ) -o $(BIN) $(LDFLAGS)

main.o: main.cpp
	$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
other.o: other.cpp
	$(CPP) -c other.cpp -o other.o $(CXXFLAGS)
hi/hi.o: hi/hi.cpp
	$(CPP) -c hi/hi.cpp -o hi/hi.o $(CXXFLAGS)

	del *.o
	del $(BIN)

.PHONY: clean

If this is slightly wrong (or dodgy), sorry, its 1AM in the morning here and I should really be going to bed!
Topic archived. No new replies allowed.