Hacker News new | ask | show | jobs
by Trufa 2695 days ago
I really don't know the first thing about C or makefiles o anything related, but I was browsing the code out of general curiosity and I have a question.

Would this code benefit from better variable names or is it just that I don't know the domain and this is good understandable code? I'm honestly curious.

This happens a lot with C code examples here.

3 comments

I think that most code benefits from better variable names. For ease of typing and for historical reasons, abbreviated variable names are in the C and makefile domain:

BIN = BINary executable

SRCS = SouRCe fileS

OBJS = OBJect fileS

DEPS = DEPendency fileS

CFLAGS = C compiler FLAGS passed as arguments to the C compiler

LDFLAGS = linker or Link eDitor FLAGS passed as arguments to the linker

I would say that the variable naming in the linked Makefile follows the usual conventions. Sure it could benefit - but at the cost of confusing readers who are accustomed to those conventions.
Most of the variables here have standard names that show up in most makefiles.