Changes in uspace/Makefile.common [664af708:1d465bf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r664af708 r1d465bf 73 73 endif 74 74 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 75 83 DEPEND = Makefile.depend 76 84 DEPEND_PREV = $(DEPEND).prev … … 90 98 LIBNET_PREFIX = $(LIB_PREFIX)/net 91 99 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 92 105 BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a 93 94 106 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 107 endif 95 108 96 109 ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y) … … 102 115 .PHONY: all clean 103 116 104 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $( EXTRA_OUTPUT)117 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT) 105 118 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV) 106 119 107 120 clean: 108 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $( EXTRA_OUTPUT) $(EXTRA_CLEAN)121 rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN) 109 122 find . -name '*.o' -follow -exec rm \{\} \; 123 find . -name '*.lo' -follow -exec rm \{\} \; 110 124 111 125 GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ … … 130 144 -pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__ 131 145 146 LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__ 147 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive 148 132 149 ifeq ($(CONFIG_DEBUG),y) 133 150 GCC_CFLAGS += -Werror … … 175 192 176 193 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 194 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES))) 177 195 178 196 ifneq ($(BINARY),) … … 191 209 endif 192 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 "^\#" > $@ 228 193 229 ifneq ($(LIBRARY),) 194 230 %.a: $(OBJECTS) … … 196 232 endif 197 233 234 ifneq ($(SLIBRARY),) 235 %.la: $(LOBJECTS) 236 $(AR) rc $@ $(LOBJECTS) 237 endif 238 198 239 %.o: %.S $(DEPEND) 199 240 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ … … 210 251 %.o: %.c $(DEPEND) 211 252 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 253 ifeq ($(PRECHECK),y) 254 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 255 endif 256 257 %.lo: %.S 258 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 259 260 %.lo: %.s 261 $(AS) $(AFLAGS) $< -o $@ 262 263 %.lo: %.c $(DEPEND) 264 $(CC) $(DEFS) $(LIB_CFLAGS) -c $< -o $@ 212 265 ifeq ($(PRECHECK),y) 213 266 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) … … 223 276 $(OUTPUT): $(OBJECTS) 224 277 278 $(LARCHIVE): $(LOBJECTS)
Note:
See TracChangeset
for help on using the changeset viewer.