Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    r0e9b512 rafdcc60e  
    7373endif
    7474
    75 ifneq ($(SLIBRARY),)
    76         LARCHIVE = $(LIBRARY).la
    77         LOUTPUT = $(SLIBRARY)
    78         EXTRA_OUTPUT += $(LOUTPUT).disasm
    79         EXTRA_CLEAN += $(LOUTPUT).map $(LOUTPUT).ldisasm \
    80             $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld
    81 endif
    82 
    8375DEPEND = Makefile.depend
    8476DEPEND_PREV = $(DEPEND).prev
     
    9890LIBNET_PREFIX = $(LIB_PREFIX)/net
    9991
    100 ifeq ($(DYNAMIC_LINKING),y)
    101 BASE_LIBS = $(LIBC_PREFIX)/libc.so.0 $(LIBSOFTINT_PREFIX)/libsoftint.a
    102 LFLAGS = -Bdynamic
    103 LINKER_SCRIPT ?= $(LIBC_PREFIX)/shared/arch/$(UARCH)/_link.ld
    104 else
    10592BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
     93
    10694LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    107 endif
    10895
    10996ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y)
     
    115102.PHONY: all clean
    116103
    117 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT)
     104all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(EXTRA_OUTPUT)
    118105        -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
    119106
    120107clean:
    121         rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
     108        rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
    122109        find . -name '*.o' -follow -exec rm \{\} \;
    123         find . -name '*.lo' -follow -exec rm \{\} \;
    124110
    125111GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     
    144130        -pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__
    145131
    146 LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__
    147 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive
    148 
    149132ifeq ($(CONFIG_DEBUG),y)
    150133        GCC_CFLAGS += -Werror
     
    192175
    193176OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
    194 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES)))
    195177
    196178ifneq ($(BINARY),)
     
    203185
    204186$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    205         $(LD) -N $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
     187        $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    206188ifeq ($(CONFIG_STRIP_BINARIES),y)
    207189        $(STRIP) $(BINARY)
    208190endif
    209191endif
    210 
    211 ifneq ($(SLIBRARY),)
    212 %.disasm: $(LOUTPUT)
    213 ifeq ($(CONFIG_LINE_DEBUG),y)
    214         $(OBJDUMP) -d -S $< > $@
    215 else
    216         $(OBJDUMP) -d $< > $@
    217 endif
    218 
    219 $(LOUTPUT): $(LARCHIVE) $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld
    220         $(LD) -T $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld $(LIB_LFLAGS) $(LARCHIVE) -o $@ -Map $(LOUTPUT).map
    221 endif
    222 
    223 $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld: $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld.in
    224         $(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
    225 
    226 $(LIBC_PREFIX)/shared/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/shared/arch/$(UARCH)/_link.ld.in
    227         $(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
    228192
    229193ifneq ($(LIBRARY),)
    230194%.a: $(OBJECTS)
    231195        $(AR) rc $@ $(OBJECTS)
    232 endif
    233 
    234 ifneq ($(SLIBRARY),)
    235 %.la: $(LOBJECTS)
    236         $(AR) rc $@ $(LOBJECTS)
    237196endif
    238197
     
    255214endif
    256215
    257 %.lo: %.S $(DEPEND)
    258         $(CC) $(DEFS) $(LIB_CFLAGS) -D__ASM__ -c $< -o $@
    259 ifeq ($(PRECHECK),y)
    260         $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    261 endif
    262 
    263 %.lo: %.s $(DEPEND)
    264         $(AS) $(AFLAGS) -o $@ $<
    265 ifeq ($(PRECHECK),y)
    266         $(JOBFILE) $(JOB) $< $@ as asm
    267 endif
    268 
    269 %.lo: %.c $(DEPEND)
    270         $(CC) $(DEFS) $(LIB_CFLAGS) -c $< -o $@
    271 ifeq ($(PRECHECK),y)
    272         $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
    273 endif
    274 
    275216$(DEPEND): $(PRE_DEPEND)
    276217        makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
     
    282223$(OUTPUT): $(OBJECTS)
    283224
    284 $(LARCHIVE): $(LOBJECTS)
Note: See TracChangeset for help on using the changeset viewer.