I am using F5 to compile my programs
set makeprg=make\ -f\ ~/makefile\ %< noremap <F5> :make<CR>
But I want to add one other way to compile my programs which compiles a bit slowly and use some other key say F4. I tried inserting another such statement below these lines but then F5 also compiles with the new makefile.
As asked in comments:
set makeprg=make\ -f\ ~/makefile\ %< noremap <F5> :make<CR> " slow compilation but more flags for more checks set makeprg=make\ -f\ ~/makefile1\ %< noremap <F4> :make<CR>