• 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 248 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 (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

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT