mkbootimg: Add Loki support

* I want my target-files built images to be Loki'd if the device
  needs Loki.
* With this, devices that rely on Loki can ship Lineage Recovery
  officially.
* Import loki_tool from: https://github.com/Stricted/android_external_loki.

Change-Id: I45ef363e05566268c8f24f7e8939a2d785478fbe
diff --git a/loki_tool/Makefile b/loki_tool/Makefile
new file mode 100644
index 0000000..8d58748
--- /dev/null
+++ b/loki_tool/Makefile
@@ -0,0 +1,30 @@
+SRC_LOKI := loki_flash.c loki_patch.c loki_find.c loki_unlok.c main.c
+OBJ_LOKI = $(SRC_LOKI:.c=.o)
+MODULE_LOKI := loki_tool
+
+CC := arm-linux-androideabi-gcc
+CC_STRIP := arm-linux-androideabi-strip
+
+CFLAGS += -g -static -Wall
+#$(LDFLAGS) +=
+
+all: $(MODULE_LOKI)
+
+host: CC := gcc
+host: $(MODULE_LOKI)
+
+%.o: %.c
+	$(CC) -c -o $@ $< $(CFLAGS)
+
+$(MODULE_LOKI): $(OBJ_LOKI)
+	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
+
+strip:
+	$(CC_STRIP) --strip-unneeded $(MODULE_LOKI)
+	$(CC_STRIP) --strip-debug $(MODULE_LOKI)
+
+clean:
+	rm -f *.o
+	rm -f loki_tool
+
+.phony: host all