############################################################################ # Makefile for the ALMOS-MKH "mini-libc" # ############################################################################ -include ../../params-soft.mk ifeq ($(ARCH_NAME),) $(error Please define in ARCH_NAME parameter in params-soft.mk!) endif SRCS = malloc.c stdio.c stdlib.c string.c OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ $(HAL_ARCH)/build/core/hal_user.o INCLUDES = -I. -I$(KERNEL)/syscalls -I$(HAL)/generic -I../mini-libpthread libs : build/lib/libc.a build : @mkdir build @mkdir build/lib @mkdir build/include $(HAL_ARCH)/build/core/hal_user.o : $(MAKE) -C $(HAL_ARCH) build/%.o : %.c %.h $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< $(DU) -D $@ > $@.txt build/lib/libc.a: build $(OBJS) $(AR) rc $@ $(OBJS) ranlib $@ cp $(SRCS:.c=.h) $(HAL)/generic/hal_user.h $(KERNEL)/syscalls/shared_syscalls.h build/include/. .PHONY = build clean clean: rm -f build/*.o build/*.txt build/include/* build/lib/*