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

Last change on this file since 444 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.2 KB
Line 
1############################################################################
2#                  Makefile for the ALMOS-MKH "mini-libc"                  #
3############################################################################
4
5-include ../../params-soft.mk
6ifeq ($(ARCH_NAME),)
7$(error Please define in ARCH_NAME parameter in params-soft.mk!)
8endif
9
10SRCS = ctype.c  dirent.c  fcntl.c  signal.c  stdio.c  stdlib.c  string.c  strings.c  sys/mman.c  sys/stat.c  sys/time.c  sys/wait.c  unistd.c
11OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
12       $(HAL_ARCH)/build/core/hal_user.o
13
14INCLUDES = -I. -I$(HAL)/generic -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE)
15
16libs : build/lib/libc.a headers
17
18build :
19        @mkdir build
20        @mkdir build/sys
21        @mkdir build/lib
22        @mkdir build/include
23        @mkdir build/include/sys
24
25$(HAL_ARCH)/build/core/hal_user.o :
26        $(MAKE) -C $(HAL_ARCH)
27
28
29build/%.o : %.c %.h
30        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
31        $(DU) -D $@ > $@.txt
32
33headers: build
34        cp $(SRCS:.c=.h) assert.h build/include/.
35        cp sys/*.h build/include/sys/.
36
37build/lib/libc.a: build $(OBJS)
38        $(AR) rc $@ $(OBJS)
39        ranlib $@
40        $(RANLIB) $@
41
42.PHONY = build clean headers
43
44
45clean:
46        rm -rf build/
Note: See TracBrowser for help on using the repository browser.