Index: uspace/lib/posix/Makefile
===================================================================
--- uspace/lib/posix/Makefile	(revision e9dba436d9889d3165e64f44a57e7177939eacd8)
+++ uspace/lib/posix/Makefile	(revision 663b26ec6c1b72234946b558186b76ec2fd3f3d8)
@@ -98,9 +98,9 @@
 
 EXPORT_CPPFLAGS = \
-	-specs $(EXPORT_DIR)/lib/gcc.specs \
-	-isystem $(EXPORT_DIR)/include
+	-specs $$(HELENOS_EXPORT_ROOT)/lib/gcc.specs \
+	-isystem $$(HELENOS_EXPORT_ROOT)/include
 
 EXPORT_LDFLAGS = \
-	-L$(EXPORT_DIR)/lib \
+	-L$$(HELENOS_EXPORT_ROOT)/lib \
 	--whole-archive -lc -lmath --no-whole-archive \
 	-T link.ld
@@ -131,8 +131,9 @@
 	find ../c/include -type f -and -not -name '*.h' -delete
 
-export: $(EXPORT_DIR)/config
+export: $(EXPORT_DIR)/config.mk $(EXPORT_DIR)/config.rc
 
-$(EXPORT_DIR)/config: export-libs export-includes
+$(EXPORT_DIR)/config.mk: export-libs export-includes
 	echo '# Generated file, do not modify.' >> $@.new
+	echo '# Do not forget to set HELENOS_EXPORT_ROOT.' >> $@.new
 	echo 'HELENOS_CROSS_PATH="$(shell dirname $(CC))"' >> $@.new
 	echo 'HELENOS_TARGET="$(TARGET)"' >> $@.new
@@ -141,4 +142,7 @@
 	echo 'HELENOS_LDFLAGS="$(EXPORT_LDFLAGS)"' >> $@.new
 	mv $@.new $@
+
+$(EXPORT_DIR)/config.rc: $(EXPORT_DIR)/config.mk
+	sed 's:$$(HELENOS_EXPORT_ROOT):$$HELENOS_EXPORT_ROOT:g' < $< >$@
 
 export-libs: $(EXPORT_FILES) export-includes
