source: trunk/libs/mini-libc/Makefile @ 661

Last change on this file since 661 was 661, checked in by alain, 3 years ago

Introduce the non-standatd display_socket() syscall.
Improve the non-standard get_string() syscall.

File size: 1.8 KB
RevLine 
[439]1############################################################################
[445]2#          Makefile for the "mini-libc" library.                           #
[439]3############################################################################
4
5-include ../../params-soft.mk
[445]6
[439]7ifeq ($(ARCH_NAME),)
8$(error Please define in ARCH_NAME parameter in params-soft.mk!)
9endif
10
[445]11SRCS = ctype.c   \
12       dirent.c  \
13       fcntl.c   \
14       mman.c    \
15       signal.c  \
[661]16       socket.c  \
[445]17       stat.c    \
18       stdio.c   \
19       stdlib.c  \
20       string.c  \
21       strings.c \
22       time.c    \
23       unistd.c  \
24       wait.c 
25
[439]26OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
27       $(HAL_ARCH)/build/core/hal_user.o
28
[445]29INCLUDES = -I.                     \
30           -I$(LIBPTHREAD_PATH)    \
31           -I$(LIBALMOSMKH_PATH)   \
32           -I$(SHARED_INCLUDE)     \
33           -I$(HAL)/generic        \
34           -I$(HAL_ARCH)/core      \
35           -I$(KERNEL) 
[439]36
[445]37libs : build/lib/libc.a  headers
[439]38
39build :
40        @mkdir build
41        @mkdir build/lib
42        @mkdir build/include
[444]43        @mkdir build/include/sys
[439]44
45$(HAL_ARCH)/build/core/hal_user.o :
46        $(MAKE) -C $(HAL_ARCH)
47
48build/%.o : %.c %.h
49        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
50        $(DU) -D $@ > $@.txt
51
[444]52headers: build
[445]53        cp ctype.h   build/include/.
54        cp dirent.h  build/include/.
55        cp fcntl.h   build/include/.
56        cp mman.h    build/include/sys/.
57        cp signal.h  build/include/.
[661]58        cp socket.h  build/include/sys/.
[445]59        cp stat.h    build/include/sys/.
60        cp stdio.h   build/include/.
61        cp stdlib.h  build/include/.
62        cp string.h  build/include/.
63        cp strings.h build/include/.
64        cp time.h    build/include/.
65        cp unistd.h  build/include/.
66        cp wait.h    build/include/sys/.
[444]67
[439]68build/lib/libc.a: build $(OBJS)
69        $(AR) rc $@ $(OBJS)
[440]70        $(RANLIB) $@
[439]71
[444]72.PHONY = build clean headers
[439]73
74clean:
[444]75        rm -rf build/
Note: See TracBrowser for help on using the repository browser.