-$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o
- $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^ -L$(PKG_BUILD_DIR) -lnvram
+$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o $(PKG_BUILD_DIR)/libnvram.so
+ $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $< -L$(PKG_BUILD_DIR) -lnvram