Changes in uspace/lib/posix/Makefile [ea42e44:7f9df7b9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/Makefile
rea42e44 r7f9df7b9 45 45 $(LIBSOFTINT_PREFIX)/libsoftint.a 46 46 47 SPECS = gcc.specs48 LIBC_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld49 LIBC_STARTUP_FILE = $(shell sed -n -e 's/^.*STARTUP(\(.*\)).*$$/\1/p' $(LIBC_LINKER_SCRIPT))50 EXPORT_LINKER_SCRIPT = link.ld51 EXPORT_STARTUP_FILE = crt0.o52 53 EXPORT_FILES = \54 ../math/libmath.a \55 ../clui/libclui.a \56 $(MERGED_C_LIBRARY) \57 $(EXPORT_STARTUP_FILE) \58 $(EXPORT_LINKER_SCRIPT) \59 $(SPECS)60 61 47 REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list 62 48 … … 67 53 libc.o 68 54 69 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY) $(SPECS) $(EXPORT_LINKER_SCRIPT) $(EXPORT_STARTUP_FILE)55 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY) 70 56 71 57 SOURCES = \ … … 97 83 test/scanf.c 98 84 99 EXPORT_CPPFLAGS = \100 -specs $$(HELENOS_EXPORT_ROOT)/lib/gcc.specs \101 -isystem $$(HELENOS_EXPORT_ROOT)/include102 103 EXPORT_LDFLAGS = \104 -L$$(HELENOS_EXPORT_ROOT)/lib \105 -T link.ld106 107 EXPORT_LDLIBS = \108 -lmath -lc109 110 EXPORT_CFLAGS = \111 -specs $$(HELENOS_EXPORT_ROOT)/lib/gcc.specs112 113 85 include $(USPACE_PREFIX)/Makefile.common 114 86 115 $(SPECS): $(CONFIG_MAKEFILE) 116 echo '*self_spec:' > $@.new 117 echo '+ $(COMMON_CFLAGS)' >> $@.new 118 echo >> $@.new 119 echo '*cpp:' >> $@.new 120 echo '+ $(COMMON_CPPFLAGS)' >> $@.new 121 echo >> $@.new 122 echo '*lib:' >> $@.new 123 echo '$(EXPORT_LDLIBS)' >> $@.new 124 mv $@.new $@ 125 126 $(EXPORT_LINKER_SCRIPT): $(LIBC_LINKER_SCRIPT) 127 sed 's/STARTUP(.*)/STARTUP(crt0.o)/' $< > $@ 128 129 $(EXPORT_STARTUP_FILE): $(LIBC_STARTUP_FILE) 130 cp $< $@ 131 132 $(INCLUDE_LIBC): $(shell find ../c/include -name '*.h') 133 cp -r -L --remove-destination -T ../c/include $@ 134 find ../c/include -type f -and -not -name '*.h' -delete 135 136 export: $(EXPORT_DIR)/config.mk $(EXPORT_DIR)/config.rc 137 138 $(EXPORT_DIR)/config.mk: export-libs export-includes 139 echo '# Generated file, do not modify.' >> $@.new 140 echo '# Do not forget to set HELENOS_EXPORT_ROOT.' >> $@.new 141 echo 'HELENOS_CROSS_PATH="$(shell dirname $(CC))"' >> $@.new 142 echo 'HELENOS_ARCH="$(firstword $(subst -, ,$(TARGET)))"' >> $@.new 143 echo 'HELENOS_TARGET="$(TARGET)"' >> $@.new 144 echo 'HELENOS_CPPFLAGS="$(EXPORT_CPPFLAGS)"' >> $@.new 145 echo 'HELENOS_CFLAGS="$(EXPORT_CFLAGS)"' >> $@.new 146 echo 'HELENOS_CXXFLAGS="$(EXPORT_CFLAGS)"' >> $@.new 147 echo 'HELENOS_LDFLAGS="$(EXPORT_LDFLAGS)"' >> $@.new 148 echo 'HELENOS_LDLIBS="$(EXPORT_LDLIBS)"' >> $@.new 149 mv $@.new $@ 150 151 $(EXPORT_DIR)/config.rc: $(EXPORT_DIR)/config.mk 152 sed 's:$$(HELENOS_EXPORT_ROOT):$$HELENOS_EXPORT_ROOT:g' < $< >$@ 153 154 export-libs: $(EXPORT_FILES) export-includes 155 mkdir -p $(EXPORT_DIR)/lib 156 cp -L $(EXPORT_FILES) $(EXPORT_DIR)/lib 157 158 export-includes: $(INCLUDE_LIBC) $(shell find ./include ../c/arch/$(UARCH)/include $(ROOT_PATH)/abi/include -name '*.h') 159 mkdir -p $(EXPORT_DIR)/include 160 rm -rf $(EXPORT_DIR)/include.new 161 cp -r -L -T ./include/posix $(EXPORT_DIR)/include.new 162 cp -r -L -T ./include/libc $(EXPORT_DIR)/include.new/libc 163 cp -r -L ../c/arch/$(UARCH)/include/* $(EXPORT_DIR)/include.new/libc 164 cp -r -L $(ROOT_PATH)/abi/include/* $(EXPORT_DIR)/include.new 165 mkdir -p $(EXPORT_DIR)/include.new/libclui 166 cp -L ../clui/tinput.h $(EXPORT_DIR)/include.new/libclui 167 168 find "$(EXPORT_DIR)/include.new/libc" "$(EXPORT_DIR)/include.new/libclui" -name '*.h' -exec sed \ 169 -e 's:#include <:#include <libc/:' \ 170 -e 's:#include <libc/abi/:#include <abi/:' \ 171 -e 's:#include <libc/_bits/:#include <_bits/:' \ 172 -e 's:#include <libc/libc/:#include <libc/:' \ 173 -i {} \; 174 find "$(EXPORT_DIR)/include.new" -name '*.h' -exec sed \ 175 -e 's:#include "posix/:#include ":' \ 176 -e 's:#include <posix/:#include <:' \ 177 -i {} \; 178 179 rm -rf $(EXPORT_DIR)/include 180 mv $(EXPORT_DIR)/include.new $(EXPORT_DIR)/include 87 $(INCLUDE_LIBC): ../c/include 88 ln -s -f -n ../$^ $@ 181 89 182 90 $(FIXED_C_LIBRARY): $(LIBC_FILE) $(REDEFS_HIDE_LIBC) … … 189 97 $(REDEFS_HIDE_LIBC): $(SOURCES) 190 98 sed -n -e 's/_HIDE_LIBC_SYMBOL(\(.*\))/\1 __helenos_libc_\1/p' $(SOURCES) >$@ 99
Note:
See TracChangeset
for help on using the changeset viewer.