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

Last change on this file since 443 was 440, checked in by alain, 7 years ago

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

File size: 1.0 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 = malloc.c  stdio.c  stdlib.c  string.c
11
12OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
13       $(HAL_ARCH)/build/core/hal_user.o
14
15INCLUDES = -I. -I$(KERNEL)/syscalls -I$(HAL)/generic -I../mini-libpthread
16
17libs : build/lib/libc.a
18
19build :
20        @mkdir build
21        @mkdir build/lib
22        @mkdir build/include
23
24$(HAL_ARCH)/build/core/hal_user.o :
25        $(MAKE) -C $(HAL_ARCH)
26
27
28build/%.o : %.c %.h
29        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
30        $(DU) -D $@ > $@.txt
31
32build/lib/libc.a: build $(OBJS)
33        $(AR) rc $@ $(OBJS)
34        $(RANLIB) $@
35        cp $(SRCS:.c=.h) $(HAL)/generic/hal_user.h $(KERNEL)/syscalls/shared_syscalls.h build/include/.
36
37.PHONY = build clean
38
39
40clean:
41        rm -f build/*.o build/*.txt build/include/* build/lib/*
Note: See TracBrowser for help on using the repository browser.