Linking to libraries needs to be last to resolve all missing symbols at
the final stage rather than just linking to object being compiled.
Signed-off-by: Keith Busch <keith.busch@intel.com>
lnvm-nvme.o memblaze-nvme.o
nvme: nvme.c nvme.h $(OBJS) NVME-VERSION-FILE
- $(CC) $(CPPFLAGS) $(CFLAGS) nvme.c $(LDFLAGS) -o $(NVME) $(OBJS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) nvme.c -o $(NVME) $(OBJS) $(LDFLAGS)
nvme.o: nvme.c nvme.h nvme-print.h nvme-ioctl.h argconfig.h suffix.h nvme-lightnvm.h fabrics.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<