blob: 5a317fd383c0767c44df0738757c79dd5cc6b8de [file] [log] [blame]
swissChili2b5acc82021-03-13 17:06:42 -08001jmk_project := initrd
2jmk_target = initrd.img
3ROOT := /home/ch/dev/bluejay
4ASM ?= nasm
5CC ?= gcc
6LD ?= ld
7CFLAGS += -I$(ROOT)/include
8
9all: $(jmk_target)
10
11
12jmk_lib_path_mkinitrd = $(ROOT)/src/mkinitrd
13jmk_lib_target_mkinitrd = mkinitrd
14jmk_libs_phony += $(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd)
15
16$(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd):
17 $(MAKE) -C $(jmk_lib_path_mkinitrd) $(jmk_lib_target_mkinitrd)
18
swissChilif46600c2021-03-03 12:35:33 -080019SOURCES = config
swissChilif46600c2021-03-03 12:35:33 -080020
swissChili2b5acc82021-03-13 17:06:42 -080021initrd.img: $(SOURCES) | $(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd)
22 $(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd) $@ $^
swissChilif46600c2021-03-03 12:35:33 -080023
swissChili2b5acc82021-03-13 17:06:42 -080024clean:
25 rm -f *.o *.a *.so $(jmk_target)
swissChilif46600c2021-03-03 12:35:33 -080026
swissChili2b5acc82021-03-13 17:06:42 -080027Makefile: Jmk
28 cd "/home/ch/dev/bluejay" && ./bin/jmk
29
30.PHONY: $(jmk_libs_phony) $(jmk_custom_phony) clean all