From f61da8be06fdfebc598cba783e78117319231140 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sun, 3 Mar 2024 08:44:42 +0000 Subject: build changes --- service/Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 service/Makefile (limited to 'service/Makefile') diff --git a/service/Makefile b/service/Makefile new file mode 100644 index 0000000..d6e762d --- /dev/null +++ b/service/Makefile @@ -0,0 +1,37 @@ +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/posix -I../api/libc -I../api -I. + +CFLAGS += -fPIC -fvisibility=hidden -mgeneral-regs-only + +LDSCRIPT := kc.ld + +CRT_OBJS := start_x86_64.o dynamic_x86_64.o elf64.o kjarna.o +LIB_OBJS := memcmp.o memcpy.o memmove.o memset.o string.o stdio.o \ + printf.o +APP_OBJS := 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) + -- cgit v1.3.1-1-g115d