swissChili | 2b5acc8 | 2021-03-13 17:06:42 -0800 | [diff] [blame^] | 1 | jmk_project := initrd |
| 2 | jmk_target = initrd.img |
| 3 | ROOT := /home/ch/dev/bluejay |
| 4 | ASM ?= nasm |
| 5 | CC ?= gcc |
| 6 | LD ?= ld |
| 7 | CFLAGS += -I$(ROOT)/include |
| 8 | |
| 9 | all: $(jmk_target) |
| 10 | |
| 11 | |
| 12 | jmk_lib_path_mkinitrd = $(ROOT)/src/mkinitrd |
| 13 | jmk_lib_target_mkinitrd = mkinitrd |
| 14 | jmk_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 | |
swissChili | f46600c | 2021-03-03 12:35:33 -0800 | [diff] [blame] | 19 | SOURCES = config |
swissChili | f46600c | 2021-03-03 12:35:33 -0800 | [diff] [blame] | 20 | |
swissChili | 2b5acc8 | 2021-03-13 17:06:42 -0800 | [diff] [blame^] | 21 | initrd.img: $(SOURCES) | $(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd) |
| 22 | $(jmk_lib_path_mkinitrd)/$(jmk_lib_target_mkinitrd) $@ $^ |
swissChili | f46600c | 2021-03-03 12:35:33 -0800 | [diff] [blame] | 23 | |
swissChili | 2b5acc8 | 2021-03-13 17:06:42 -0800 | [diff] [blame^] | 24 | clean: |
| 25 | rm -f *.o *.a *.so $(jmk_target) |
swissChili | f46600c | 2021-03-03 12:35:33 -0800 | [diff] [blame] | 26 | |
swissChili | 2b5acc8 | 2021-03-13 17:06:42 -0800 | [diff] [blame^] | 27 | Makefile: Jmk |
| 28 | cd "/home/ch/dev/bluejay" && ./bin/jmk |
| 29 | |
| 30 | .PHONY: $(jmk_libs_phony) $(jmk_custom_phony) clean all |