Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple target names with same result?

Tags:

makefile

Hey all. I was wondering, if I want to have two targets do the same thing in my makefile without duplicating, how would I go about this?

For example:

Cat:
    $(CC) -o a.out

Feline:
    $(CC) -o a.out

Thanks!

like image 303
clamport Avatar asked Aug 25 '26 04:08

clamport


1 Answers

Cat Feline:
        $(CC) -o a.out

You can list multiple targets as well as multiple dependencies.

like image 191
geekosaur Avatar answered Aug 26 '26 22:08

geekosaur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!