• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

make Command Examples in Linux

by admin

In most cases, once the makefile is created, simply issuing make and then make file without arguments will install the application. This is because the make command automatically looks for the makefile in the current directory. You can, however, issue make with various options.

make Command Examples

1. Call the first target specified in the Makefile (usually named “all”):

# make

2. Call a specific target:

# make target

3. Call a specific target, executing 4 jobs at a time in parallel:

# make -j4 target

4. Use a specific Makefile:

# make --file file

5. Execute make from another directory:

# make --directory directory

6. Force making of a target, even if source files are unchanged:

# make --always-make target

7. Override a variable defined in the Makefile:

# make target variable=new_value

8. Override variables defined in the Makefile by the environment:

# make --environment-overrides target

Filed Under: Linux

Some more articles you might also be interested in …

  1. grub-install Command Options
  2. lvdisplay error: “Failed to create directory /var/lock/lvm. File-based locking initilisation failed.”
  3. How to Schedule Jobs with ‘at’ command under Linux
  4. How to Troubleshoot Performance Issues on Linux – Beginners Guide
  5. LVM ISCSI Physical Volume Not Available After Server Reboot
  6. CentOS / RHEL 7 : systemd-analyze command to find booting time delays
  7. head Command Examples in Linux
  8. How to Install default-libmysqlclient-dev software package in Debian
  9. goldeneye.py Command Examples in Linux
  10. links Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright