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


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    rd9be488 r8620b2f  
    4444#   EXTRA_CLEAN        additional cleanup targets
    4545#
    46 #   MATH               set to 'y' to use the math library
    4746#   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 
    113112LIBMATH_PREFIX = $(LIB_PREFIX)/math
    114 LIBMATH_INCLUDES_FLAGS = \
    115         -I$(LIBMATH_PREFIX)/include \
    116         -I$(LIBMATH_PREFIX)/arch/$(UARCH)/include
    117113
    118114LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix
     
    150146LIBURI_PREFIX = $(LIB_PREFIX)/uri
    151147
    152 LIBMBR_PREFIX = $(LIB_PREFIX)/mbr
    153 LIBGPT_PREFIX = $(LIB_PREFIX)/gpt
    154 
    155148ifeq ($(STATIC_NEEDED),y)
    156149        STATIC_BUILD = y
     
    159152                STATIC_BUILD = y
    160153        else
    161                 ifeq ($(CONFIG_USE_SHARED_LIBS),y)
     154                ifeq ($(CONFIG_USE_SHARED_LIBS), y)
    162155                        STATIC_BUILD = n
    163156                else
     
    176169        BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
    177170        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    178         ifeq ($(MATH),y)
    179                 BASE_LIBS += $(LIBMATH_PREFIX)/libmath.a
    180         endif
    181171else
    182172        BASE_LIBS = $(LIBC_PREFIX)/libc.so0 $(LIBSOFTINT_PREFIX)/libsofti.so0
    183173        LFLAGS = -Bdynamic
    184174        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
    185         ifeq ($(MATH),y)
    186                 BASE_LIBS += $(LIBMATH_PREFIX)/libmath.so0
    187         endif
    188 endif
    189 
    190 ifeq ($(MATH),y)
    191         INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS) $(LIBMATH_INCLUDES_FLAGS)
    192 else
    193         INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS)
    194175endif
    195176
     
    210191        find . -name '*.lo' -follow -exec rm \{\} \;
    211192
    212 GCC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     193GCC_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    213194        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    214195        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     
    217198        -pipe -ggdb -D__$(ENDIANESS)__
    218199
    219 ICC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     200ICC_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    220201        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    221202        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     
    250231# Prepare for POSIX before including platform specific stuff
    251232ifeq ($(POSIX_COMPAT),y)
    252         CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix -I$(LIBPOSIX_PREFIX)/include/
     233        CFLAGS = -I$(LIBPOSIX_PREFIX)/include/posix  -I$(LIBPOSIX_PREFIX)/include/
    253234        BASE_LIBS = $(LIBPOSIX_PREFIX)/libposixaslibc.a $(LIBPOSIX_PREFIX)/libc4posix.a $(LIBSOFTINT_PREFIX)/libsoftint.a
     235endif
     236
     237# Do we need math?
     238ifeq ($(NEEDS_MATH),y)
     239        BASE_LIBS += $(LIBMATH_PREFIX)/libmath.a
    254240endif
    255241
Note: See TracChangeset for help on using the changeset viewer.