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

Last change on this file since 661 was 661, checked in by alain, 21 months ago

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

File size: 1.8 KB
Line 
1############################################################################
2#          Makefile for the "mini-libc" library.                           #
3############################################################################
4
5-include ../../params-soft.mk
6
7ifeq ($(ARCH_NAME),)
8$(error Please define in ARCH_NAME parameter in params-soft.mk!)
9endif
10
11SRCS = ctype.c   \
12       dirent.c  \
13       fcntl.c   \
14       mman.c    \
15       signal.c  \
16       socket.c  \
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
26OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
27       $(HAL_ARCH)/build/core/hal_user.o
28
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) 
36
37libs : build/lib/libc.a  headers
38
39build :
40        @mkdir build
41        @mkdir build/lib
42        @mkdir build/include
43        @mkdir build/include/sys
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
52headers: build
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/.
58        cp socket.h  build/include/sys/.
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/.
67
68build/lib/libc.a: build $(OBJS)
69        $(AR) rc $@ $(OBJS)
70        $(RANLIB) $@
71
72.PHONY = build clean headers
73
74clean:
75        rm -rf build/
Note: See TracBrowser for help on using the repository browser.