 <p>Of course you can write a makefile by hand. A quick googling shows LOTS of tutorials. <a href="http://mrbook.org/tutorials/make/" rel="nofollow noreferrer">This one</a> looks promising.</p> <p>For the cliffs notes version, the example boils down this:</p> <pre><code>CC=g++ CFLAGS=-c -Wall LDFLAGS= SOURCES=main.cpp hello.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=hello all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: $(CC) $(CFLAGS) $&lt; -o $@ </code></pre>