Makefiles for Use with GPUTILS
Now that I’ve switched to GPUTILS from MPLAB, makefiles have re-entered my life. I’ve always hated writing them.
The last time I did was probably five or six years ago for BREW projects, an atavism not unlike my recent return to assembler. As I sat down to write three new ones (and they’re about as straightforward as makefiles get), all the unpleasantness came flooding back to me. Forgettable macros, single stems, arcane completion rules—I thought about documenting my innumerable complaints, but found someone had already summarized them perfectly.
Three little makefiles suffice for my needs, and I worked on them just long enough to get them operational. I shall not think on them again. Here’s what I came up with to build one of the libraries (the other is essentially identical, except for the target and objects):
For the actual executable (the PIC hex file), I added a couple of targets to control the K150 programmer, using my updated and corrected version of pp
. This makefile recurses into the library directories to build them if necessary. There’s better make-_fu_ than my hack approach, but did I mention it works fine?