I have no idea how to create a makefile

You can use the online makefile generator.

You should watch the Systems programming lectures of Smaragdakis at delos to learn how to write a makefile though.