• 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

This Article Has Been Shared 900 Times!

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

  • Google’s Cloud Computing and Branding Strategies in 2013

    Google’s Cloud Computing and Branding Strategies in 2013 quite significant. Google is taking approaches for increasing brand value through Hardware, Cloud etc.

  • UNIX Operating System : Brief Technical Perspective

    UNIX Operating System is a multi-user operating system released in August 1969 by Bell Laboratories to support the development of softwares. Here is some words.

  • What is SDK (Software Development Kit)?

    What is SDK ? You often come to this terminology, ever wondered what this SDK, which is an abbreviation of Software Development Kit stands for ?

  • Azure IaaS and Impact on Marketshare by Amazon and Rackspace

    Azure IaaS is possibly the most important move on Cloud Computing IaaS market by Microsoft Azure in 2013. Unlike Rackspace, they have kept a free trial tier.

  • Mac Pro : Technical Details of Apple’s Workstation

    Mac Pro is Apple’s most powerful and highly configurable Intel Xeon–based workstation computer came as successor of Apple Power Mac G5 series.

Additionally, 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 (22.1K 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

  • Big Data in Sports May 20, 2022
  • FaaS Versus PaaS Deployment: What You Should Know May 18, 2022
  • What Is A Digital Media Consultancy? May 17, 2022
  • How Artificial Intelligence (AI) Is Changing The Way We Play Bingo May 16, 2022
  • Why You Need A Big Data Consultant May 15, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Using make Command on OSX to Compile Application," in The Customize Windows, August 29, 2013, May 20, 2022, https://thecustomizewindows.com/2013/08/using-make-command-on-osx-to-compile-application/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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