How do I write a hook to compile css and js with drush make?
In general, you shouldn't use Drush for that. Instead, use a build process, and one of the steps in the build would be drush make.

There are a number of existing build systems that can be used to achieve what you're looking for, including (but not limited to):


Phing - https://www.phing.info/
Jenkins - https://jenkins-ci.org/
Grunt Drupal Tasks - https://github.com/phase2/grunt-drupal-tasks
Aquifer - https://github.com/aquifer/aquifer


A typical process would have the following steps:


Delete build TARGET directory
drush make drupal.make TARGET --prepare-install
Symbolically link custom profiles, themes, and modules
Execute task to compile CSS, JS