diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-10 15:46:33 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-10 15:46:33 -0400 |
commit | 65ba015d6c1f248d36ad01a653bc49637804b15b (patch) | |
tree | a77c3fb3ca7ecac8f65eb9638d152f1e90307d0a /apps/init/Makefile | |
download | jove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.tar.gz jove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.tar.bz2 jove-os-65ba015d6c1f248d36ad01a653bc49637804b15b.zip |
working usermode objdir iteration
Diffstat (limited to 'apps/init/Makefile')
-rw-r--r-- | apps/init/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/init/Makefile b/apps/init/Makefile new file mode 100644 index 0000000..642ca38 --- /dev/null +++ b/apps/init/Makefile @@ -0,0 +1,21 @@ +include $(CONFIG) + +CFILES := $(wildcard *.c) +OFILES := $(patsubst %.c,%.o,$(CFILES)) +OFILES += $(STATICLIBS) + +CFLAGS := -ffreestanding -nostdlib -g +LDFLAGS := -T $(TARGET_MACHINE).ld +OCFLAGS := -O binary \ + --set-section-flags .bss=alloc,load,contents + +all: $(OFILES) + $(LD) $(LDFLAGS) ${OFILES} -o init.elf + objcopy $(OCFLAGS) init.elf $(OUT)/init + +clean: + -rm ${OFILES} + -rm init.elf + +%.o:%.c + $(CC) $(CFLAGS) -c $< -o $@ |