diff options
| author | Ada Christine <adachristine18@gmail.com> | 2024-02-22 20:05:51 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2024-02-22 20:05:51 +0000 |
| commit | aec58be40927ec0b2a0e6742396f880d52ce38b5 (patch) | |
| tree | 5336b9966808a6d0706e7469d239d1dbc11cb3e2 /kjarna_runtime/Makefile | |
| parent | e97aa65fc42f08fe666a9a21b69d05ab17231920 (diff) | |
kjarna runtime
Diffstat (limited to 'kjarna_runtime/Makefile')
| -rw-r--r-- | kjarna_runtime/Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kjarna_runtime/Makefile b/kjarna_runtime/Makefile new file mode 100644 index 0000000..568beba --- /dev/null +++ b/kjarna_runtime/Makefile @@ -0,0 +1,36 @@ +include ../defaults.mk + +LDFLAGS += -z max-page-size=4096 --export-dynamic -pic \ + -z separate-code -pie -Bsymbolic -shared \ + -z noexecstack -g + +VPATH := ../lib + +TARGET := kjarna.os +.DEFAULT: $(TARGET) + +CPPFLAGS += -I../api -I. + +CFLAGS += -fPIC -fvisibility=hidden -mgeneral-regs-only + +LDSCRIPT := kc.ld + +CRT_OBJS := start_x86_64.o reloc_x86_64.o dynamic_x86_64.o elf64.o +LIB_OBJS := memcmp.o memcpy.o memmove.o memset.o string.o +APP_OBJS := kc_main.o + +OBJS := $(CRT_OBJS) $(LIB_OBJS) $(APP_OBJS) + +DEPS := $(patsubst %.o,%.d,$(OBJS)) + +$(TARGET): $(LDSCRIPT) $(MAKEFILE_LIST) +$(TARGET): $(OBJS) + +CLEANLIST := $(wildcard $(OBJS) $(TARGET)) +DCLEANLIST := $(wildcard $(DEPS)) + +include ../rules.mk +-include $(DEPS) + +.DEFAULT: $(TARGET) + |
