Changes in uspace/Makefile.common [1d465bf:664af708] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r1d465bf r664af708 73 73 endif 74 74 75 ifneq ($(SLIBRARY),)76 LARCHIVE = $(LIBRARY).la77 LOUTPUT = $(SLIBRARY)78 EXTRA_OUTPUT += $(LOUTPUT).disasm79 EXTRA_CLEAN += $(LOUTPUT).map $(LOUTPUT).ldisasm \80 $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld81 endif82 83 75 DEPEND = Makefile.depend 84 76 DEPEND_PREV = $(DEPEND).prev … … 98 90 LIBNET_PREFIX = $(LIB_PREFIX)/net 99 91 100 ifeq ($(DYNAMIC_LINKING),y)101 BASE_LIBS = $(LIBC_PREFIX)/libc.so.0 $(LIBSOFTINT_PREFIX)/libsoftint.a102 LFLAGS = -Bdynamic103 LINKER_SCRIPT ?= $(LIBC_PREFIX)/shared/arch/$(UARCH)/_link.ld104 else105 92 BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a 93 106 94 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 107 endif108 95 109 96 ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y) … … 115 102 .PHONY: all clean 116 103 117 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $( LOUTPUT) $(EXTRA_OUTPUT)104 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(EXTRA_OUTPUT) 118 105 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV) 119 106 120 107 clean: 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) 122 109 find . -name '*.o' -follow -exec rm \{\} \; 123 find . -name '*.lo' -follow -exec rm \{\} \;124 110 125 111 GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ … … 144 130 -pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__ 145 131 146 LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__147 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive148 149 132 ifeq ($(CONFIG_DEBUG),y) 150 133 GCC_CFLAGS += -Werror … … 192 175 193 176 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 194 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES)))195 177 196 178 ifneq ($(BINARY),) … … 209 191 endif 210 192 211 ifneq ($(SLIBRARY),)212 %.disasm: $(LOUTPUT)213 ifeq ($(CONFIG_LINE_DEBUG),y)214 $(OBJDUMP) -d -S $< > $@215 else216 $(OBJDUMP) -d $< > $@217 endif218 219 $(LOUTPUT): $(LARCHIVE) $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld220 $(LD) -T $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld $(LIB_LFLAGS) $(LARCHIVE) -o $@ -Map $(LOUTPUT).map221 endif222 223 $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld: $(LIBC_PREFIX)/shared/arch/$(UARCH)/_lib.ld.in224 $(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.in227 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@228 229 193 ifneq ($(LIBRARY),) 230 194 %.a: $(OBJECTS) 231 195 $(AR) rc $@ $(OBJECTS) 232 endif233 234 ifneq ($(SLIBRARY),)235 %.la: $(LOBJECTS)236 $(AR) rc $@ $(LOBJECTS)237 196 endif 238 197 … … 255 214 endif 256 215 257 %.lo: %.S258 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@259 260 %.lo: %.s261 $(AS) $(AFLAGS) $< -o $@262 263 %.lo: %.c $(DEPEND)264 $(CC) $(DEFS) $(LIB_CFLAGS) -c $< -o $@265 ifeq ($(PRECHECK),y)266 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)267 endif268 269 216 $(DEPEND): $(PRE_DEPEND) 270 217 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null … … 276 223 $(OUTPUT): $(OBJECTS) 277 224 278 $(LARCHIVE): $(LOBJECTS)
Note:
See TracChangeset
for help on using the changeset viewer.