diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-05 22:06:24 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-05 22:06:24 +0200 |
commit | 97176775f264efa8b30d5d89375a3c739ff6aa7d (patch) | |
tree | d29209ad9f6be3738599a8349874189111d812a5 | |
parent | Add sha512sum checksum to grub (diff) | |
download | kernel-97176775f264efa8b30d5d89375a3c739ff6aa7d.tar.xz |
makefile: replace ,SRCS with .SRCS
-rw-r--r-- | devices/Makefile | 2 | ||||
-rw-r--r-- | i686/Makefile | 2 | ||||
-rw-r--r-- | lib/Makefile | 2 | ||||
-rw-r--r-- | rules.mk | 13 | ||||
-rw-r--r-- | src/Makefile | 4 |
5 files changed, 11 insertions, 12 deletions
diff --git a/devices/Makefile b/devices/Makefile index 62a0b88..3b7f163 100644 --- a/devices/Makefile +++ b/devices/Makefile @@ -2,7 +2,7 @@ include ../Makefile.config CCFLAGS += -I. -I../${ARCH} -I../lib -devs,SRCS = pic_8259.c uart_16550.c vga.c i8042.c pckbd.c mouse.c +devs.SRCS = pic_8259.c uart_16550.c vga.c i8042.c pckbd.c mouse.c include ../rules.mk diff --git a/i686/Makefile b/i686/Makefile index a04e5d3..8575d99 100644 --- a/i686/Makefile +++ b/i686/Makefile @@ -2,7 +2,7 @@ include ../Makefile.config CCFLAGS += -I../grub/include -I../lib -mgeneral-regs-only -arch,SRCS = boot.S init.s \ +arch.SRCS = boot.S init.s \ gdt.c lgdt.c \ lidt.c isr.c diff --git a/lib/Makefile b/lib/Makefile index 8f27824..0da59de 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,7 +2,7 @@ include ../Makefile.config CCFLAGS += -I. -I.. -libk,SRCS = memcpy.c memset.c stdio/printf.c string/itoa.c +libk.SRCS = memcpy.c memset.c stdio/printf.c string/itoa.c include ../rules.mk @@ -1,9 +1,8 @@ -# for each target,SRCS, generate target,OBJS, target.a and add target,OBJS to all -, = , -$(foreach V,$(filter %$(,)SRCS, ${.VARIABLES}),\ - $(eval $(V:$(,)SRCS=$(,)OBJS) += $(foreach f,$($(V)),$(addsuffix .o,$(basename $(f))))) \ - $(eval $(V:$(,)SRCS=.a): $($(V:$(,)SRCS=$(,)OBJS))) \ - $(eval all: $($(V:$(,)SRCS=$(,)OBJS))) \ +# for each target.SRCS, generate target.OBJS, target.a and add target.OBJS to all +$(foreach V,$(filter %.SRCS, ${.VARIABLES}),\ + $(eval $(V:%.SRCS=%.OBJS) += $(foreach f,$($(V)),$(addsuffix .o,$(basename $(f))))) \ + $(eval $(V:%.SRCS=%.a): $($(V:%.SRCS=%.OBJS))) \ + $(eval all: $($(V:%.SRCS=%.OBJS))) \ ) # Suffix rules @@ -27,4 +26,4 @@ $(foreach V,$(filter %$(,)SRCS, ${.VARIABLES}),\ # clean target .PHONY: clean clean: - @$(foreach V,$(filter %$(,)OBJS, ${.VARIABLES}), rm -rf $($(V))) + @$(foreach V,$(filter %.OBJS, ${.VARIABLES}), rm -rf $($(V))) diff --git a/src/Makefile b/src/Makefile index 7b31c3c..f58ec04 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,8 +2,8 @@ include ../Makefile.config CCFLAGS += -I. -isystem../grub/include -I../${ARCH} -I../lib -I.. -kernel,SRCS := multiboot2.c mmap.c kernel.c mem/vmm.c -kernel,OBJS := conf.h +kernel.SRCS := multiboot2.c mmap.c kernel.c mem/vmm.c +kernel.OBJS := conf.h include ../rules.mk |