Ignore:
Timestamp:
May 29, 2018, 9:27:23 AM (7 years ago)
Author:
alain
Message:

Restructure the mini_libc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/Makefile

    r444 r445  
    11############################################################################
    2 #                  Makefile for the ALMOS-MKH "mini-libc"                  #
     2#          Makefile for the "mini-libc" library.                           #
    33############################################################################
    44
    55-include ../../params-soft.mk
     6
    67ifeq ($(ARCH_NAME),)
    78$(error Please define in ARCH_NAME parameter in params-soft.mk!)
    89endif
    910
    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
     11SRCS = ctype.c   \
     12       dirent.c  \
     13       fcntl.c   \
     14       mman.c    \
     15       signal.c  \
     16       stat.c    \
     17       stdio.c   \
     18       stdlib.c  \
     19       string.c  \
     20       strings.c \
     21       time.c    \
     22       unistd.c  \
     23       wait.c 
     24
    1125OBJS = $(addprefix build/, $(SRCS:.c=.o)) \
    1226       $(HAL_ARCH)/build/core/hal_user.o
    1327
    14 INCLUDES = -I. -I$(HAL)/generic -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE)
     28INCLUDES = -I.                     \
     29           -I$(LIBPTHREAD_PATH)    \
     30           -I$(LIBALMOSMKH_PATH)   \
     31           -I$(SHARED_INCLUDE)     \
     32           -I$(HAL)/generic        \
     33           -I$(HAL_ARCH)/core      \
     34           -I$(KERNEL)
    1535
    16 libs : build/lib/libc.a headers
     36libs : build/lib/libc.a  headers
    1737
    1838build :
    1939        @mkdir build
    20         @mkdir build/sys
    2140        @mkdir build/lib
    2241        @mkdir build/include
     
    2645        $(MAKE) -C $(HAL_ARCH)
    2746
    28 
    2947build/%.o : %.c %.h
    3048        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     
    3250
    3351headers: build
    34         cp $(SRCS:.c=.h) assert.h build/include/.
    35         cp sys/*.h build/include/sys/.
     52        cp ctype.h   build/include/.
     53        cp dirent.h  build/include/.
     54        cp fcntl.h   build/include/.
     55        cp mman.h    build/include/sys/.
     56        cp signal.h  build/include/.
     57        cp stat.h    build/include/sys/.
     58        cp stdio.h   build/include/.
     59        cp stdlib.h  build/include/.
     60        cp string.h  build/include/.
     61        cp strings.h build/include/.
     62        cp time.h    build/include/.
     63        cp unistd.h  build/include/.
     64        cp wait.h    build/include/sys/.
    3665
    3766build/lib/libc.a: build $(OBJS)
    3867        $(AR) rc $@ $(OBJS)
    39         ranlib $@
    4068        $(RANLIB) $@
    4169
    4270.PHONY = build clean headers
    4371
    44 
    4572clean:
    4673        rm -rf build/
Note: See TracChangeset for help on using the changeset viewer.