Fix: Move COMPRESSION_COMMAND_DEPS before first use

This is a fixed version of commit a8f0bb8df822711ce7ecae12e902e2f72131ef66
which was reverted recently by commit 88d65e514c062c2a50212a79e623744bae39b7b7.

To be concise, the code that was moved need to be outside of block "ifneq ($(BOARD_KERNEL_MODULES_16K),)"
in order for non 16K builds to have no errors.

Bug: 349524000
Change-Id: I6264c984837b8aa479c353abee1526bab2dd83ec
Signed-off-by: cactusnoh <cactusnoh@gmail.com>
diff --git a/core/Makefile b/core/Makefile
index ccb4c3e..1e9c736 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1075,6 +1075,16 @@
 
 BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
 
+ifeq ($(BOARD_RAMDISK_USE_LZ4),true)
+# -l enables the legacy format used by the Linux kernel
+COMPRESSION_COMMAND_DEPS := $(LZ4)
+COMPRESSION_COMMAND := $(LZ4) -l -12 --favor-decSpeed
+RAMDISK_EXT := .lz4
+else
+COMPRESSION_COMMAND_DEPS := $(GZIP)
+COMPRESSION_COMMAND := $(GZIP)
+RAMDISK_EXT := .gz
+endif
 
 ifneq ($(BOARD_KERNEL_MODULES_16K),)
 
@@ -1257,17 +1267,6 @@
 endif
 
 
-ifeq ($(BOARD_RAMDISK_USE_LZ4),true)
-# -l enables the legacy format used by the Linux kernel
-COMPRESSION_COMMAND_DEPS := $(LZ4)
-COMPRESSION_COMMAND := $(LZ4) -l -12 --favor-decSpeed
-RAMDISK_EXT := .lz4
-else
-COMPRESSION_COMMAND_DEPS := $(GZIP)
-COMPRESSION_COMMAND := $(GZIP)
-RAMDISK_EXT := .gz
-endif
-
 # This file contains /dev nodes description added to the generic ramdisk
 RAMDISK_NODE_LIST := $(PRODUCT_OUT)/ramdisk_node_list