I'd like to use the first argument (target) of the make command as a value of a variable inside the Makefile so that instead of:
make var=arg1 I can do
make arg1 So that in the Makefile I can refer to it as TARGET:
$(TARGET): $(OBJS) @echo -e "\n\n\t\t*** Compiled $(TARGET) successfully! ***\n" ; $(FL) $(LFLAGS) -o $(BUILDS_DIR)$@ \ $(OBJS) \ $(LIBS) @echo -e "\n\n\t\t*** Linking $(TARGET) completed! ***\n"` Additionally, is it possible to set TARGET to default value if make is called without an target argument?
Thanks