
People are getting in the habit of force-linking things like `zlib` to fix linking/include issues on Mojave (which doesn't install headers to `/usr/include` by default). This way lies madness so encourage people to instead pass the correct compiler flags instead.
Homebrew's Formula API
This is the (partially) documented public API for Homebrew.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.
You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.
Good luck!