I am trying to compile a program using CodeBlocks 8.02 and mingw

I can't figure out how to set codeblocks to use the Makefile that was included with the software I am trying to work on.

How do I set variables for the compile for the Makefile once I get it working and
I can not find out what library these functions are in:

#include <sys/select.h>
#include <utime.h>
#include <signal.h>
#include <pthread.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>

#ifdef __CYGWIN__
#include <sys/vfs.h>
#include <sys/statvfs.h>
I have a development environment set up for a linux embedded system.

The windows code for a similar program is little endian and my code I am working on is
big endian.

I am trying to debug some embedded code, adding the swaps for Big and Little endian systems. I do not know what is supposed to be in a variable and I want to compile a program for windows so I can see what it is supposed to be.

I know it is a lot to ask, just can someone point me in the correct direction ? So I can figure out my problem. At the same time I am learning socket programming and I do not know what to expect.

Thank you for any help you can give.