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
|
Rev | Line | |
---|
[439] | 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 | |
---|
[444] | 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 |
---|
[439] | 11 | OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ |
---|
| 12 | $(HAL_ARCH)/build/core/hal_user.o |
---|
| 13 | |
---|
[444] | 14 | INCLUDES = -I. -I$(HAL)/generic -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) |
---|
[439] | 15 | |
---|
[444] | 16 | libs : build/lib/libc.a headers |
---|
[439] | 17 | |
---|
| 18 | build : |
---|
| 19 | @mkdir build |
---|
[444] | 20 | @mkdir build/sys |
---|
[439] | 21 | @mkdir build/lib |
---|
| 22 | @mkdir build/include |
---|
[444] | 23 | @mkdir build/include/sys |
---|
[439] | 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 | |
---|
[444] | 33 | headers: build |
---|
| 34 | cp $(SRCS:.c=.h) assert.h build/include/. |
---|
| 35 | cp sys/*.h build/include/sys/. |
---|
| 36 | |
---|
[439] | 37 | build/lib/libc.a: build $(OBJS) |
---|
| 38 | $(AR) rc $@ $(OBJS) |
---|
[444] | 39 | ranlib $@ |
---|
[440] | 40 | $(RANLIB) $@ |
---|
[439] | 41 | |
---|
[444] | 42 | .PHONY = build clean headers |
---|
[439] | 43 | |
---|
| 44 | |
---|
| 45 | clean: |
---|
[444] | 46 | rm -rf build/ |
---|
Note: See
TracBrowser
for help on using the repository browser.