Compile iob.c with $(compile)

This commit is contained in:
Michal Sieron 2021-07-29 10:55:24 +02:00
parent 8a38a79967
commit ead3f8b2e0
1 changed files with 4 additions and 17 deletions

View File

@ -1,25 +1,8 @@
include ../include/generated/variables.mak
include $(SOC_DIRECTORY)/software/common.mak
pINCLUDES = -I$(PICOLIBC_DIRECTORY)/newlib/libc/tinystdio \
-I$(PICOLIBC_DIRECTORY)/newlib/libc/include \
-I$(SOC_DIRECTORY)/software/include \
-I$(BUILDINC_DIRECTORY)/../libc \
-I$(BUILDINC_DIRECTORY) \
-I$(CPU_DIRECTORY)
pCOMMONFLAGS = -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdlib -fno-stack-protector $(pINCLUDES)
pCFLAGS = $(pCOMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
all: libc.a iob.c.o
iob.c.o:
$(CC) \
-c $(LIBC_DIRECTORY)/iob.c \
-o $@ \
$(pCFLAGS)
$(AR) csr libc.a iob.c.o
libc.a:
meson $(PICOLIBC_DIRECTORY) \
-Dmultilib=false \
@ -27,3 +10,7 @@ libc.a:
meson compile
cp newlib/libc.a libc.a
iob.c.o: $(LIBC_DIRECTORY)/iob.c
$(compile)
$(AR) csr libc.a iob.c.o