Use JMK build system
diff --git a/src/mkinitrd/Makefile b/src/mkinitrd/Makefile
index b121b75..a003dff 100644
--- a/src/mkinitrd/Makefile
+++ b/src/mkinitrd/Makefile
@@ -1,14 +1,33 @@
+jmk_project := mkinitrd
+jmk_target = mkinitrd
+ROOT := /home/ch/dev/bluejay
+ASM ?= nasm
+CC ?= gcc
+LD ?= ld
+CFLAGS += -I$(ROOT)/include
+
+all: $(jmk_target)
+
+CFLAGS += -O2
+CFLAGS += -Wall -Wno-unused-function -Wno-unused-variable
+
+.c.o:
+ $(CC) -c $< -o $@ $(CFLAGS)
+
+
OBJECTS = main.o
-JAYROOT = ../../
-CFLAGS = -O2 -I$(JAYROOT)/include -Wall
-mkinitrd: $(OBJECTS)
- $(CC) -o $@ $^
-
+jmk_custom_phony += install
install: mkinitrd
- cp mkinitrd $(JAYROOT)/bin
+ cp $< $(ROOT)/bin
+
+$(jmk_target): $(OBJECTS)
+ $(CC) -o $@ $^ $(CFLAGS)
clean:
- rm -f *.o mkinitrd
+ rm -f *.o *.a *.so $(jmk_target)
-.PHONY: clean install
+Makefile: Jmk
+ cd "/home/ch/dev/bluejay" && ./bin/jmk
+
+.PHONY: $(jmk_libs_phony) $(jmk_custom_phony) clean all