• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Using make Command on OSX to Compile Application

By Abhishek Ghosh August 29, 2013 3:48 pm Updated on November 25, 2016

Using make Command on OSX to Compile Application

Advertisement

Using make Command on OSX to compile application is quite useful as many OS X applications’ source code is distributed as Free Softwares while the dmg are paid. Definitely, this is not only the reason; there are much more reasons why we will use make command or rather compile fro source code. textmate, for example on Links CLI Based Browser With Graphics for OS X guide, we shown that without compiling, actually you can not use the software with all features. In other words, using make Command on OSX to compile application has many practical utility.

 

Using make Command on OSX to Compile Application : The History Behind

 

You can ignore this part if you are in a hurry for some reason and just want to see the practical part of using make Command on OSX to compile application, which is written below, this is how the make command came – the history of make Command. The make utility is part of the POSIX standards, its presently designated in IEEE Std 1003.1, 2008.

make is a build management tool that executes commands depending on conditions. It is mainly used in software development. make reads a so-called makefile in the dependencies of the translation process, which are recorded in formalized programs. This formalization describes the source files in which way the compiler or other programs process object files to the linker libraries or executable programs. All steps are carried out in accordance with the detected dependencies in the makefile. Originally make was created by Stuart Feldman in 1977 at Bell Labs, UNIX system consisted of operating system dependent “make” and “install” shell scripts accompanying their program’s source. Software, essentially were free or had a less fee. You can read the this part from Richard Stallman’s books, writings – how few companies introduced the close source software system. Right now we have pmake (BSD), GNU Make (FSF, Richard M. Stallman), Makepp (again GNU and FSF) and nmake (Microsoft’s, difficult to compare with other make due to restricted features). POSIX includes standardization of the basic features and operation of the make utility.

Advertisement

---

 

Using make Command on OSX to Compile Application : The Practical Part

 

OS X uses GNU autoconf, automake, or autoheader :

 

Vim
1
https://developer.apple.com/library/mac/documentation/porting/conceptual/portingunix/compiling/compiling.html

 

You can run the command :

Vim
1
gcc -v

on iTerm2 or Terminal App in OS X, you will see the POSIX thing in output :

 
Using make Command on OSX to Compile Application

Other things you can see, we have marked on the screen shot. If you getting trouble to use make command, be sure to run this command :

export PATH=$PATH:/Developer/usr/bin

Also be certain to update your ~/.bashrc (or ~/.profile or ~/.bash_login) file. Definitely, it is must to install XCode. This is easy way – its a part of Conditional Compilation on OS X as Mac has various CPU structures. You can run :

which make

command to check the status of make – usually it will show the path. If you have Xcode 4.3 or newer the command line tools, such as make, are not installed by default. In Xcode preferences go to the “Downloads” tab and under “Components” push the “Install” button next to “Command Line Tools”. After you have successfully downloaded and installed the command line tools you should also type the following command in the Terminal to make sure all your Xcode command line tools are switched to use the 4.3 versions:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

 
Note that from within Terminal you can use the XCRUN tool to launch compilers and other tools embedded within the Xcode application. Use the XCODE-SELECT tool to define which version of Xcode is active. Type “man xcrun” from within Terminal to find out more.
A GNU Make source tarball contains a build.sh script to resolve this. If you need to build GNU Make and have no other make program to use, you can use the shell script build.sh instead. To do this, first run configure as described in INSTALL. Then, instead of typing make to build the program, type sh build.sh. This should compile the program in the current directory. Then you will have a Make program that you can use for ./make install, or whatever else.
Do not apply all the methods together.

 

Using make Command on OSX to Compile Application : Example

 

The steps will install memcached and available at /usr/local/bin/memcached :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mkdir memcachedbuild
cd memcachebuild
curl -O http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz
tar xzvf libevent-1.4.14-stable.tar.gz
cd libevent-1.4.14-stable
./configure
make
make verify
sudo make install
cd memcachedbuild
curl -O http://memcached.googlecode.com/files/memcached-1.4.10.tar.gz
tar xzvf memcached-1.4.10.tar.gz
cd memcached-1.4.10
./configure
make
make test
sudo make install

Tagged With use makefile on mac , run makefile mac , osx make command , makefile osx , make command os x , macosx howto run a makefile , mac os makefile installation , install using makefile mac , how to install the make command on osx , how to compile a mac 32 app into a 64 bit application
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Using make Command on OSX to Compile Application

  • Command Prompt Commands : Alphabetical list of all commands in Windows 7

    Command Prompt Commands in Windows 7 provides the user access to 180+ command line commands. Here is a list of 200 Command Prompt Commands in Windows 7.

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How To Install Memcached on Ubuntu Server And Configure WordPress

    Here Are The Steps On How To Install Memcached on Ubuntu Server 16.04, 18.04 And Configure WordPress To Optimize Page Loading Speed.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy