7 NASM
=nasm
-f elf
-i
$(INCDIR
)/
8 CC
=gcc
-m32
-g
-Wall
-W
-O2
-nostdinc
-fno-builtin
-I
$(INCDIR
)
10 STDIO
=stdio
/doprintf.o stdio
/delay.o stdio
/printf.o stdio
/sprintf.o stdio
/puts.o stdio
/putch.o stdio
/cls.o stdio
/getch.o stdio
/getkey.o stdio
/gotoxy.o stdio
/setcolor.o stdio
/beep.o stdio
/open.o stdio
/close.o stdio
/read.o stdio
/write.o stdio
/doscanf.o stdio
/scanf.o stdio
/getchar.o stdio
/fopen.o stdio
/fclose.o stdio
/fread.o stdio
/fwrite.o stdio
/fgetc.o stdio
/fgets.o stdio
/feof.o stdio
/fileno.o stdio
/fseek.o stdio
/ftell.o stdio
/fprintf.o stdio
/fputc.o
11 STRING
=string
/memset.o string
/memsetw.o string
/memcpy.o string
/memcmp.o string
/memchr.o string
/strlen.o string
/strchr.o string
/strcpy.o string
/strncpy.o string
/strcat.o string
/strncat.o string
/strcmp.o string
/strstr.o string
/strspn.o string
/strdup.o string
/strndup.o string
/strpbrk.o
12 STDLIB
=stdlib
/memory.o stdlib
/exit.o stdlib
/schedule.o stdlib
/strtol.o stdlib
/atoi.o stdlib
/itoa.o stdlib
/abort.o stdlib
/abs.o stdlib
/system.o stdlib
/rand.o
13 UNISTD
=unistd
/sleep.o unistd
/fcntl.o unistd
/dup.o unistd
/lseek.o unistd
/unlink.o unistd
/pipe.o
14 SOCKET
=socket
/connect.o socket
/socket.o socket
/send.o socket
/gethostbyname.o socket
/htons.o socket
/recv.o socket
/bind.o socket
/listen.o socket
/accept.o socket
/sendto.o socket
/recvfrom.o socket
/inet_ntop.o
15 SIGNAL
=signal
/signal.o
17 TIME
=time
/time.o time
/localtime.o
20 SYS
=sys
/ioctl.o sys
/creat.o sys
/mkdir.o sys
/rmdir.o
22 OBJS
=$(STDIO
) $(STRING
) $(STDLIB
) $(UNISTD
) $(SOCKET
) $(SIGNAL
) $(VFS
) $(TIME
) $(CTYPE
) $(ERRNO
) $(SYS
)
32 $(Q
)rm -f libc.a
$(OBJS
)
37 @printf
" ASM $(subst $(shell pwd)/,,$(@))\n";
41 @printf
" CC $(subst $(shell pwd)/,,$(@))\n";
45 libc.a
: $(OBJS
) $(MAKEDEP
)
46 @printf
" AR $(subst $(shell pwd)/,,$(@))\n";
47 $(Q
)ar rcs libc.a
$(OBJS
)