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.0 KB
|
Line | |
---|
1 | ############################################################################ |
---|
2 | # Makefile for the ALMOS-MKH "mini-libc" # |
---|
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 = malloc.c stdio.c stdlib.c string.c |
---|
11 | |
---|
12 | OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ |
---|
13 | $(HAL_ARCH)/build/core/hal_user.o |
---|
14 | |
---|
15 | INCLUDES = -I. -I$(KERNEL)/syscalls -I$(HAL)/generic -I../mini-libpthread |
---|
16 | |
---|
17 | libs : build/lib/libc.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 | |
---|
28 | build/%.o : %.c %.h |
---|
29 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
30 | $(DU) -D $@ > $@.txt |
---|
31 | |
---|
32 | build/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 | |
---|
40 | clean: |
---|
41 | rm -f build/*.o build/*.txt build/include/* build/lib/* |
---|
Note: See
TracBrowser
for help on using the repository browser.