Changeset 1ea99cc in mainline for uspace/lib/libc/Makefile
- Timestamp:
- 2009-08-20T20:47:35Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b50b5af2
- Parents:
- 24edc18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/Makefile
r24edc18 r1ea99cc 1 1 # 2 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2008 Jiri Svoboda 3 4 # All rights reserved. 4 5 # … … 38 39 39 40 include $(LIBC_PREFIX)/Makefile.toolchain 41 -include rtld/arch/$(UARCH)/Makefile.inc 40 42 43 CFLAGS += -Irtld/include -I../../srv/loader/include -D__32_BITS__ 44 PIC_CFLAGS := $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__ 41 45 42 46 ## Sources … … 74 78 generic/ipc.c \ 75 79 generic/async.c \ 80 generic/dlfcn.c \ 76 81 generic/loader.c \ 77 82 generic/getopt.c \ … … 84 89 generic/udebug.c \ 85 90 generic/vfs/vfs.c \ 86 generic/vfs/canonify.c 91 generic/vfs/canonify.c \ 92 rtld/rtld.c \ 93 rtld/elf_load.c \ 94 rtld/dynamic.c \ 95 rtld/module.c \ 96 rtld/symbol.c 97 87 98 88 99 ARCH_SOURCES += \ … … 93 104 ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) 94 105 OBJECTS := $(GENERIC_OBJECTS) $(ARCH_OBJECTS) 106 PIC_OBJECTS := $(addsuffix .pio,$(basename $(OBJECTS))) 107 108 OUTPUT := libc.a 109 110 ifeq ($(CONFIG_BUILD_SHARED_LIBC), y) 111 OUTPUT += libc.pic.a 112 endif 95 113 96 114 .PHONY: all clean depend kerninc 97 115 98 all: kerninc libc.aarch/$(UARCH)/_link.ld116 all: kerninc $(OUTPUT) arch/$(UARCH)/_link.ld 99 117 100 118 kerninc: … … 102 120 ln -sfn kernel/arch include/arch 103 121 ln -sfn ../arch/$(UARCH)/include include/libarch 122 ln -sfn ../arch/$(UARCH)/include rtld/include/arch 104 123 105 124 -include Makefile.depend 106 125 107 126 clean: 108 -rm -f include/kernel include/arch include/libarch libc.a arch/$(UARCH)/_link.ld Makefile.depend109 find generic/ arch/$(UARCH)/ -name '*.o'-follow -exec rm \{\} \;127 -rm -f include/kernel include/arch include/libarch rtld/include/arch libc.a libc.pic.a arch/$(UARCH)/_link.ld Makefile.depend 128 find . \( -name '*.o' -o -name '*.pio' \) -follow -exec rm \{\} \; 110 129 111 130 depend: kerninc 112 131 -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null 132 -makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null 113 133 114 libc.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 115 $(AR) rc libc.a $(LIBS) $(ARCH_OBJECTS) $(GENERIC_OBJECTS) 134 libc.a: depend $(OBJECTS) 135 $(AR) rc $@ $(LIBS) $(OBJECTS) 136 137 libc.pic.a: depend $(PIC_OBJECTS) 138 $(AR) rc $@ $(LIBS) $(PIC_OBJECTS) 116 139 117 140 arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in … … 126 149 %.o: %.c 127 150 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 151 152 %.pio: %.S 153 $(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ 154 155 %.pio: %.s 156 $(AS) $(AFLAGS) $< -o $@ 157 158 %.pio: %.c 159 $(CC) $(DEFS) $(PIC_CFLAGS) -c $< -o $@
Note:
See TracChangeset
for help on using the changeset viewer.