Last change
on this file since 444 was
444,
checked in by satin@…, 7 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1.2 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 = ctype.c dirent.c fcntl.c signal.c stdio.c stdlib.c string.c strings.c sys/mman.c sys/stat.c sys/time.c sys/wait.c unistd.c |
---|
11 | OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ |
---|
12 | $(HAL_ARCH)/build/core/hal_user.o |
---|
13 | |
---|
14 | INCLUDES = -I. -I$(HAL)/generic -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) |
---|
15 | |
---|
16 | libs : build/lib/libc.a headers |
---|
17 | |
---|
18 | build : |
---|
19 | @mkdir build |
---|
20 | @mkdir build/sys |
---|
21 | @mkdir build/lib |
---|
22 | @mkdir build/include |
---|
23 | @mkdir build/include/sys |
---|
24 | |
---|
25 | $(HAL_ARCH)/build/core/hal_user.o : |
---|
26 | $(MAKE) -C $(HAL_ARCH) |
---|
27 | |
---|
28 | |
---|
29 | build/%.o : %.c %.h |
---|
30 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
31 | $(DU) -D $@ > $@.txt |
---|
32 | |
---|
33 | headers: build |
---|
34 | cp $(SRCS:.c=.h) assert.h build/include/. |
---|
35 | cp sys/*.h build/include/sys/. |
---|
36 | |
---|
37 | build/lib/libc.a: build $(OBJS) |
---|
38 | $(AR) rc $@ $(OBJS) |
---|
39 | ranlib $@ |
---|
40 | $(RANLIB) $@ |
---|
41 | |
---|
42 | .PHONY = build clean headers |
---|
43 | |
---|
44 | |
---|
45 | clean: |
---|
46 | rm -rf build/ |
---|
Note: See
TracBrowser
for help on using the repository browser.