Last change
on this file since 440 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.2 KB
|
Line | |
---|
1 | ############################################################################ |
---|
2 | # Makefile for the ALMOS-MKH "mini-pthread" # |
---|
3 | ############################################################################ |
---|
4 | |
---|
5 | -include ../../params-soft.mk |
---|
6 | ifeq ($(ARCH_NAME),) |
---|
7 | $(error Please define in ARCH_NAME parameter in params-soft.mk!) |
---|
8 | endif |
---|
9 | |
---|
10 | SRCS = pthread.c |
---|
11 | OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ |
---|
12 | $(HAL_ARCH)/build/core/hal_user.o |
---|
13 | OBJS_LIBC = ../mini-libc/build/malloc.o ../mini-libc/build/stdlib.o ../mini-libc/build/stdio.o |
---|
14 | |
---|
15 | INCLUDES = -I. -I$(KERNEL)/syscalls -I$(HAL)/generic -I../mini-libc |
---|
16 | |
---|
17 | libs : build/lib/libpthread.a |
---|
18 | |
---|
19 | build : |
---|
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 | |
---|
30 | build/%.o : %.c %.h |
---|
31 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
32 | $(DU) -D $@ > $@.txt |
---|
33 | |
---|
34 | build/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 | |
---|
42 | clean: |
---|
43 | rm -f build/*.o build/*.txt build/include/* build/lib/* |
---|
Note: See
TracBrowser
for help on using the repository browser.