In your first example you've got no target. You have defined the pattern rule but never specified what should be built.
For example, your object file may be a dependency of you main program
1 2
main: obj/f2.o
$(CXX) $(LDLIBS) $^ -o $@
so in order to build main `obj/f2.o' is needed, and it will find the `obj/%.o: %.c' rule to make it.
Here you have a full example, with mechanism to obtain all the sources in a directory (it uses ./src/, but you may easily change it to ./) http://stackoverflow.com/a/2908351