can you rewrite this using Makefile-style as I proposed ? Maybe in another PR so that we can compare both ?