I want to create a makefile that will compile my objects and name them according to the Linux distro (e.g. Suse, RedHat, or Ubuntu). How can I detect if the OS is Ubuntu or not?
I want to create a makefile that will compile my objects and name them according to the Linux distro (e.g. Suse, RedHat, or Ubuntu). How can I detect if the OS is Ubuntu or not?
We use
cat /etc/lsb-release
for identifying the Ubuntu release:For other releases it might be
Gentoo, RedHat, Arch & SuSE all have a release file: http://linuxmafia.com/faq/Admin/release-files.html These is a complete script in the link ;)
Example code for operation system, architecture and version for Ubuntu type systems: