aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/libc/Makefile19
-rw-r--r--libs/libgui/Makefile9
-rw-r--r--libs/libnet/Makefile9
-rw-r--r--libs/libtxt/Makefile9
4 files changed, 16 insertions, 30 deletions
diff --git a/libs/libc/Makefile b/libs/libc/Makefile
index cc1b836..0cf1b14 100644
--- a/libs/libc/Makefile
+++ b/libs/libc/Makefile
@@ -15,13 +15,8 @@ COBJS = crt/crt0.o \
list.o \
stack.o \
random.o
-CC = ccache ../../cross/opt/bin/i686-elf-gcc
-LD = ccache ../../cross/opt/bin/i686-elf-ld
-AR = ccache ../../cross/opt/bin/i686-elf-ar
-AS = ccache nasm
CFLAGS = $(CFLAGS_DEFAULT) -Iinc/
-
ASFLAGS = -f elf32
%.o: %.c
@@ -29,15 +24,15 @@ ASFLAGS = -f elf32
libc: CFLAGS += -pie -fPIE -fPIC -DUSER
libc: $(COBJS)
- @mkdir -p ../../build/
- @$(AS) $(ASFLAGS) crt/crti.asm -o ../../build/crti.o
- @$(AS) $(ASFLAGS) crt/crtn.asm -o ../../build/crtn.o
- @$(AR) rcs ../../build/libc.a ../../build/crti.o ../../build/crti.o $+
+ @mkdir -p $(BUILD)
+ @$(AS) $(ASFLAGS) crt/crti.asm -o $(BUILD)/crti.o
+ @$(AS) $(ASFLAGS) crt/crtn.asm -o $(BUILD)/crtn.o
+ @$(AR) rcs $(BUILD)/libc.a $(BUILD)/crti.o $(BUILD)/crti.o $+
-libk: CFLAGS += -DKERNEL -ffreestanding -I../../kernel/inc/ $(CFLAGS_EXTRA)
+libk: CFLAGS += -DKERNEL -ffreestanding -I$(KERNEL)/inc/ $(CFLAGS_EXTRA)
libk: $(COBJS)
- @mkdir -p ../../build/
- @$(AR) rcs ../../build/libk.a $+
+ @mkdir -p $(BUILD)
+ @$(AR) rcs $(BUILD)/libk.a $+
clean:
@find . -name "*.o" -type f -delete
diff --git a/libs/libgui/Makefile b/libs/libgui/Makefile
index 47e2556..2f76e61 100644
--- a/libs/libgui/Makefile
+++ b/libs/libgui/Makefile
@@ -6,11 +6,8 @@ COBJS = psf.o \
gfx.o \
gui.o \
msg.o
-CC = ccache ../../cross/opt/bin/i686-elf-gcc
-LD = ccache ../../cross/opt/bin/i686-elf-ld
-AR = ccache ../../cross/opt/bin/i686-elf-ar
-CFLAGS = $(CFLAGS_DEFAULT) -I../ -I../libc/inc/ -pie -fPIE -fPIC -DUSER
+CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS) -I$(LIBS)/libc/inc/ -pie -fPIE -fPIC -DUSER
all: libgui
@@ -18,8 +15,8 @@ all: libgui
@$(CC) -c $(CFLAGS) $< -o $@
libgui: $(COBJS)
- @mkdir -p ../../build/
- @$(AR) rcs ../../build/libgui.a $+
+ @mkdir -p $(BUILD)
+ @$(AR) rcs $(BUILD)/libgui.a $+
clean:
@find . -name "*.o" -type f -delete
diff --git a/libs/libnet/Makefile b/libs/libnet/Makefile
index 7094875..53cb7a9 100644
--- a/libs/libnet/Makefile
+++ b/libs/libnet/Makefile
@@ -1,11 +1,8 @@
# MIT License, Copyright (c) 2020 Marvin Borner
COBJS = dns.o http.o ip.o
-CC = ccache ../../cross/opt/bin/i686-elf-gcc
-LD = ccache ../../cross/opt/bin/i686-elf-ld
-AR = ccache ../../cross/opt/bin/i686-elf-ar
-CFLAGS = $(CFLAGS_DEFAULT) -I../ -I../libc/inc/ -pie -fPIE -fPIC -DUSER
+CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS) -I$(LIBS)/libc/inc/ -pie -fPIE -fPIC -DUSER
all: libtxt
@@ -13,8 +10,8 @@ all: libtxt
@$(CC) -c $(CFLAGS) $< -o $@
libtxt: $(COBJS)
- @mkdir -p ../../build/
- @$(AR) rcs ../../build/libnet.a $+
+ @mkdir -p $(BUILD)
+ @$(AR) rcs $(BUILD)/libnet.a $+
clean:
@find . -name "*.o" -type f -delete
diff --git a/libs/libtxt/Makefile b/libs/libtxt/Makefile
index 38fe01f..d073711 100644
--- a/libs/libtxt/Makefile
+++ b/libs/libtxt/Makefile
@@ -1,11 +1,8 @@
# MIT License, Copyright (c) 2020 Marvin Borner
COBJS = keymap.o #xml.o html.o
-CC = ccache ../../cross/opt/bin/i686-elf-gcc
-LD = ccache ../../cross/opt/bin/i686-elf-ld
-AR = ccache ../../cross/opt/bin/i686-elf-ar
-CFLAGS = $(CFLAGS_DEFAULT) -I../ -I../libc/inc/ -pie -fPIE -fPIC -DUSER
+CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS) -I$(LIBS)/libc/inc/ -pie -fPIE -fPIC -DUSER
all: libtxt
@@ -13,8 +10,8 @@ all: libtxt
@$(CC) -c $(CFLAGS) $< -o $@
libtxt: $(COBJS)
- @mkdir -p ../../build/
- @$(AR) rcs ../../build/libtxt.a $+
+ @mkdir -p $(BUILD)
+ @$(AR) rcs $(BUILD)/libtxt.a $+
clean:
@find . -name "*.o" -type f -delete