blob: a003dff6f755878d74759109b535fd36b1714abb [file] [log] [blame]
swissChili2b5acc82021-03-13 17:06:42 -08001jmk_project := mkinitrd
2jmk_target = mkinitrd
3ROOT := /home/ch/dev/bluejay
4ASM ?= nasm
5CC ?= gcc
6LD ?= ld
7CFLAGS += -I$(ROOT)/include
8
9all: $(jmk_target)
10
11CFLAGS += -O2
12CFLAGS += -Wall -Wno-unused-function -Wno-unused-variable
13
14.c.o:
15 $(CC) -c $< -o $@ $(CFLAGS)
16
17
swissChilib3abcd92021-03-02 20:00:44 -080018OBJECTS = main.o
swissChilib3abcd92021-03-02 20:00:44 -080019
swissChili2b5acc82021-03-13 17:06:42 -080020jmk_custom_phony += install
swissChilif46600c2021-03-03 12:35:33 -080021install: mkinitrd
swissChili2b5acc82021-03-13 17:06:42 -080022 cp $< $(ROOT)/bin
23
24$(jmk_target): $(OBJECTS)
25 $(CC) -o $@ $^ $(CFLAGS)
swissChilif46600c2021-03-03 12:35:33 -080026
swissChilib3abcd92021-03-02 20:00:44 -080027clean:
swissChili2b5acc82021-03-13 17:06:42 -080028 rm -f *.o *.a *.so $(jmk_target)
swissChilib3abcd92021-03-02 20:00:44 -080029
swissChili2b5acc82021-03-13 17:06:42 -080030Makefile: Jmk
31 cd "/home/ch/dev/bluejay" && ./bin/jmk
32
33.PHONY: $(jmk_libs_phony) $(jmk_custom_phony) clean all