Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
Choose between makefile and Makefile on Linux

I want to do a make in a directory with both Makefile and makefile. By default, it will execute makefile. Is there any options I can do to execute the Makefile instead?

Thanks in advance.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The easy option is to use -f:

$ make -f Makefile

From man 1 make (the GNU make, I presume):

If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order.

So you con link your Makefile to the name GNUmakefile. But my advise, if you really want this, is to use an alias:

$ alias make='make -f Makefile'
over 4 years ago · Santiago Trujillo Report

0

Read GNU make documentation. Just type

 make -f Makefile

You might consider making a symlink from Makefile to GNUmakefile but I consider horrible to have several makefile like files.

Having both Makefile and makefile makes your project unreadable. Please have mercy on your successor developer.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!