Last change
on this file since 439 was
439,
checked in by satin@…, 7 years ago
|
Introduice new distributed Makefile architecture.
Remove deprecated sys/ directory
|
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.