Use JMK build system
diff --git a/src/mkinitrd/Jmk b/src/mkinitrd/Jmk
new file mode 100644
index 0000000..fa8acc2
--- /dev/null
+++ b/src/mkinitrd/Jmk
@@ -0,0 +1,16 @@
+init(mkinitrd)
+
+preset(optimize)
+preset(warn)
+
+archetype(c)
+
+OBJECTS = main.o
+
+phony(install)
+install: mkinitrd
+ cp $< $(ROOT)/bin
+
+type(executable)
+
+finish
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