Browse Source

Use subdirectories for libc based on headers

K. Lange 5 years ago
parent
commit
4c8f8e43fb

+ 2 - 1
Makefile

@@ -25,7 +25,8 @@ CC=$(TARGET_TRIPLET)-gcc
 AR=$(TARGET_TRIPLET)-ar
 CFLAGS= -O3 -g -std=gnu99 -I. -Iapps -pipe -mfpmath=sse -mmmx -msse -msse2 -fplan9-extensions -Wall -Wextra -Wno-unused-parameter
 
-LIBC_OBJS=$(patsubst %.c,%.o,$(wildcard libc/*.c))
+LIBC_OBJS  = $(patsubst %.c,%.o,$(wildcard libc/*.c))
+LIBC_OBJS += $(patsubst %.c,%.o,$(wildcard libc/*/*.c))
 LC=base/lib/libc.so
 
 APPS=$(patsubst apps/%.c,%,$(wildcard apps/*.c))

libc/assert.c → libc/assert/assert.c


libc/dir.c → libc/dirent/dir.c


libc/mkdir.c → libc/dirent/mkdir.c


libc/errorno.c → libc/errno/errorno.c


libc/ioctl.c → libc/ioctl/ioctl.c


libc/math.c → libc/math/math.c


libc/pwd.c → libc/pwd/pwd.c


libc/printf.c → libc/stdio/printf.c


libc/puts.c → libc/stdio/puts.c


libc/stdio.c → libc/stdio/stdio.c


libc/getenv.c → libc/stdlib/getenv.c


libc/malloc.c → libc/stdlib/malloc.c


libc/qsort.c → libc/stdlib/qsort.c


libc/system.c → libc/stdlib/system.c


libc/memcpy.c → libc/string/memcpy.c


libc/memmove.c → libc/string/memmove.c


libc/memset.c → libc/string/memset.c


libc/str.c → libc/string/str.c


libc/mount.c → libc/sys/mount.c


libc/wait.c → libc/sys/wait.c


libc/gettimeofday.c → libc/time/gettimeofday.c


libc/localtime.c → libc/time/localtime.c


libc/strftime.c → libc/time/strftime.c


libc/time.c → libc/time/time.c


libc/access.c → libc/unistd/access.c


libc/execvp.c → libc/unistd/execvp.c


libc/stat.c → libc/unistd/stat.c


libc/unistd.c → libc/unistd/unistd.c


libc/wcwidth.c → libc/wchar/wcwidth.c