Define install
and uninstall
targets
#94
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
make install
command is pretty useful for Linux machines to ensure that the built executable is available on thePATH
directory, so this pull request aims to add theinstall
anduninstall
targets to support this.I have attempted to adhere to the Makefile Conventions as closely as possible (excluding those unnecessary for this project) which includes defaulting the installation to
/usr/local/gearsystem
and allowing this to be customisable withDESTDIR
andprefix
(e.g.make install prefix="/app/bin"
to install the application to/app/bin/gearsystem
).The most notable use of this is to make automated packaging systems (such as flatpak-builder) much cleaner as they will only need to specify
make install
with appropriate arguments.I have included these targets in a separate file—
Makefile.install
—as they are not applicable to every operating system; mostly just to Linux. I'm happy to add it to others if they are applicable, I'm just not that familiar with them.