diff options
author | Marvin Borner | 2021-04-05 19:37:28 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-05 19:37:28 +0200 |
commit | ccc1dd7b4ba8ad5efe51aac32b26f0859d93fbe5 (patch) | |
tree | df0e8330b14cea9ed0dd6546f69be24996f52a80 /libs | |
parent | 1f957aafa4423c1579627a279d861d03d76f3dbb (diff) |
Restructured make layout and cleaned some apps
Diffstat (limited to 'libs')
-rw-r--r-- | libs/libc/Makefile | 19 | ||||
-rw-r--r-- | libs/libgui/Makefile | 9 | ||||
-rw-r--r-- | libs/libnet/Makefile | 9 | ||||
-rw-r--r-- | libs/libtxt/Makefile | 9 |
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 |