summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordzwdz2023-02-23 15:38:17 +0100
committerdzwdz2023-02-23 15:38:17 +0100
commitc9daa8909313b020df57605d0bd50ac48b208d58 (patch)
tree7051752002999e648619bc91e4d99edfda7b9f01 /Makefile
parent5715a511fcd0490dfc74579ee95f88ef1877f021 (diff)
toolchain: update, move to a Camellia-specific toolchain
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 0aee404..a917131 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,17 @@
-PATH := $(shell pwd)/toolchain/bin/:$(PATH)
+PATH := $(shell pwd)/toolchain/prefix/bin/:$(PATH)
-AR = x86_64-elf-ar
-AS = x86_64-elf-as
-CC = x86_64-elf-gcc
+AR = x86_64-camellia-ar
+AS = x86_64-camellia-as
+CC = x86_64-camellia-gcc
CHECK = sparse
-CFLAGS += -g -std=gnu99 -ffreestanding -O2 -ftrack-macro-expansion=0
+CFLAGS += -g -std=gnu99 -O2 -ftrack-macro-expansion=0
CFLAGS += -Wall -Wextra -Wold-style-definition -Werror=implicit-function-declaration
CFLAGS += -Wno-address-of-packed-member -Werror=incompatible-pointer-types
CFLAGS += -Isrc/ -Isrc/shared/include/
-KERNEL_CFLAGS = $(CFLAGS) -mno-sse -mgeneral-regs-only
+KERNEL_CFLAGS = $(CFLAGS) -ffreestanding -mno-sse -mgeneral-regs-only
+LIBC_CFLAGS = $(CFLAGS) -Isrc/user/lib/include/ -ffreestanding
USER_CFLAGS = $(CFLAGS) -Isrc/user/lib/include/
SPARSEFLAGS = -Wno-non-pointer-null
@@ -149,9 +150,13 @@ out/obj/user/%.c.o: src/user/%.c
@mkdir -p $(@D)
@$(CC) $(USER_CFLAGS) -fPIC -c $^ -o $@
+out/obj/user/lib/%.c.o: src/user/lib/%.c
+ @mkdir -p $(@D)
+ @$(CC) $(LIBC_CFLAGS) -fPIC -c $^ -o $@
+
out/obj/user/lib/vendor/%.c.o: src/user/lib/vendor/%.c
@mkdir -p $(@D)
- @$(CC) $(USER_CFLAGS) -fPIC -c $^ -o $@ \
+ @$(CC) $(LIBC_CFLAGS) -fPIC -c $^ -o $@ \
-DLACKS_TIME_H -DLACKS_FCNTL_H -DLACKS_SYS_PARAM_H \
-DMAP_ANONYMOUS -DHAVE_MORECORE=0 -DNO_MALLOC_H \
-Wno-expansion-to-defined -Wno-old-style-definition