Dependencies for $ (TARGET) .o can be multiple object files, one for each source file in your driver. Many other drivers use the + = operator after the initial OBJS declaration. For example,
OBJS = nlb-driver.o OBJS += file1.o OBJS += file2.o ...
Then the target rule will expand to
$(TARGET).o: nlb-driver.o file1.o file2.o $(LD) $(LD_RFLAG) -r -o $@ $(OBJS)
It is good if there are more source files than is convenient on line. But if there is only a small number of files, you can also define all objects in one line
OBJS = nlb-driver.o file1.o file2.o
ctuffli
source share