Changes in uspace/Makefile.common [8620b2f:d9be488] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    r8620b2f rd9be488  
    4444#   EXTRA_CLEAN        additional cleanup targets
    4545#
     46#   MATH               set to 'y' to use the math library
    4647#   POSIX_COMPAT       set to 'y' to use POSIX compatibility layer
    47 #   NEEDS_MATH         set to 'y' to add implementation of mathematical functions
    4848#
    4949# Optionally, for a binary:
     
    8787endif
    8888
    89 ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
     89ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
    9090        ifneq ($(SLIBRARY),)
    9191                LARCHIVE = $(LIBRARY).la
     
    110110LIBSOFTFLOAT_PREFIX = $(LIB_PREFIX)/softfloat
    111111LIBSOFTINT_PREFIX = $(LIB_PREFIX)/softint
     112
    112113LIBMATH_PREFIX = $(LIB_PREFIX)/math
     114LIBMATH_INCLUDES_FLAGS = \
     115        -I$(LIBMATH_PREFIX)/include \
     116        -I$(LIBMATH_PREFIX)/arch/$(UARCH)/include
    113117
    114118LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix
     
    146150LIBURI_PREFIX = $(LIB_PREFIX)/uri
    147151
     152LIBMBR_PREFIX = $(LIB_PREFIX)/mbr
     153LIBGPT_PREFIX = $(LIB_PREFIX)/gpt
     154
    148155ifeq ($(STATIC_NEEDED),y)
    149156        STATIC_BUILD = y
     
    152159                STATIC_BUILD = y
    153160        else
    154                 ifeq ($(CONFIG_USE_SHARED_LIBS), y)
     161                ifeq ($(CONFIG_USE_SHARED_LIBS),y)
    155162                        STATIC_BUILD = n
    156163                else
     
    169176        BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
    170177        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
     178        ifeq ($(MATH),y)
     179                BASE_LIBS += $(LIBMATH_PREFIX)/libmath.a
     180        endif
    171181else
    172182        BASE_LIBS = $(LIBC_PREFIX)/libc.so0 $(LIBSOFTINT_PREFIX)/libsofti.so0
    173183        LFLAGS = -Bdynamic
    174184        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
     185        ifeq ($(MATH),y)
     186                BASE_LIBS += $(LIBMATH_PREFIX)/libmath.so0
     187        endif
     188endif
     189
     190ifeq ($(MATH),y)
     191        INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS) $(LIBMATH_INCLUDES_FLAGS)
     192else
     193        INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS)
    175194endif
    176195
     
    191210        find . -name '*.lo' -follow -exec rm \{\} \;
    192211
    193 GCC_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     212GCC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    194213        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    195214        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     
    198217        -pipe -ggdb -D__$(ENDIANESS)__
    199218
    200 ICC_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     219ICC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    201220        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    202221        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     
    231250# Prepare for POSIX before including platform specific stuff
    232251ifeq ($(POSIX_COMPAT),y)
    233         CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix  -I$(LIBPOSIX_PREFIX)/include/
     252        CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/
    234253        BASE_LIBS = $(LIBPOSIX_PREFIX)/libposixaslibc.a $(LIBPOSIX_PREFIX)/libc4posix.a $(LIBSOFTINT_PREFIX)/libsoftint.a
    235 endif
    236 
    237 # Do we need math?
    238 ifeq ($(NEEDS_MATH),y)
    239         BASE_LIBS += $(LIBMATH_PREFIX)/libmath.a
    240254endif
    241255
Note: See TracChangeset for help on using the changeset viewer.