If you want (need) to install command line tools in MacOS and do not want to install the full xCode:
1 – Launch the Terminal
2 – Run the following command
xcode-select --install
The installation will be in /Library/Developer/CommandLineTools/ and will have the following tools:
ar as asa bison BuildStrings c++ c89 c99 cc clang clang++ cmpdylib codesign_allocate CpMac cpp ctags ctf_insert DeRez dsymutil dwarfdump dyldinfo flex flex++ g++ gatherheaderdoc gcc gcov GetFileInfo git git-cvsserver git-receive-pack git-shell git-upload-archive git-upload-pack gm4 gnumake gperf hdxml2manxml headerdoc2html indent install_name_tool ld lex libtool lipo lldb lorder m4 make MergePef mig mkdep MvMac nasm ndisasm nm nmedit otool pagestuff projectInfo ranlib rebase redo_prebinding ResMerger resolveLinks Rez RezDet RezWack rpcgen segedit SetFile size SplitForks strings strip svn svnadmin svndumpfilter svnlook svnrdump svnserve svnsync svnversion unifdef unifdefall UnRezWack unwinddump what xml2man yacc