The normal way to invoke a Makefile is to run `make`, not to run the Makefile directly. Besides they would be missing a shebang anyway.
Now the example compiles using the latest ctrulib. It also uses standard C Time library to get date and time