source: trunk/libs/mini-libpthread/Makefile @ 440

Last change on this file since 440 was 440, checked in by alain, 4 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.2 KB
Line 
1############################################################################
2#                    Makefile for the ALMOS-MKH "mini-pthread"             #
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 = pthread.c
11OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
12       $(HAL_ARCH)/build/core/hal_user.o
13OBJS_LIBC = ../mini-libc/build/malloc.o ../mini-libc/build/stdlib.o ../mini-libc/build/stdio.o
14
15INCLUDES = -I. -I$(KERNEL)/syscalls -I$(HAL)/generic -I../mini-libc
16
17libs : build/lib/libpthread.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../mini-libc/build/%.o:
28        $(MAKE) -C ../libc -f Makefile.tsar
29
30build/%.o : %.c %.h
31        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
32        $(DU) -D $@ > $@.txt
33
34build/lib/libpthread.a: build $(OBJS)
35        $(AR) rc $@ $(OBJS) $(OBJS_LIBC)
36        $(RANLIB) $@
37        cp $(SRCS:.c=.h) $(HAL)/generic/hal_user.h $(KERNEL)/syscalls/shared_syscalls.h build/include/.
38
39.PHONY = build clean
40
41
42clean:
43        rm -f build/*.o build/*.txt build/include/* build/lib/*
Note: See TracBrowser for help on using the repository browser.