Install libhal to sysroot too, where it can be found.
Also, add phony target aliases to easily rebuild particular one.
This commit is contained in:
parent
7a7920a8a9
commit
5bb751c482
13
Makefile
13
Makefile
@ -2,6 +2,8 @@ TOP=$(PWD)
|
|||||||
TOOLCHAIN=$(TOP)/xtensa-lx106-elf
|
TOOLCHAIN=$(TOP)/xtensa-lx106-elf
|
||||||
STANDALONE=y
|
STANDALONE=y
|
||||||
|
|
||||||
|
.PHONY: crosstool-NG toolchain libhal
|
||||||
|
|
||||||
all: sdk_patch $(TOOLCHAIN)/lib/libhal.a $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc
|
all: sdk_patch $(TOOLCHAIN)/lib/libhal.a $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc
|
||||||
@echo
|
@echo
|
||||||
@echo "Xtensa toolchain is built, to use it:"
|
@echo "Xtensa toolchain is built, to use it:"
|
||||||
@ -43,16 +45,20 @@ esp_iot_sdk_v0.9.2/.dir: esp_iot_sdk_v0.9.2_14_10_24.zip
|
|||||||
esp_iot_sdk_v0.9.2_14_10_24.zip:
|
esp_iot_sdk_v0.9.2_14_10_24.zip:
|
||||||
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=9"
|
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=9"
|
||||||
|
|
||||||
$(TOOLCHAIN)/lib/libhal.a: $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc
|
libhal: $(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/libhal.a
|
||||||
|
|
||||||
|
$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/lib/libhal.a: $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc
|
||||||
make -C lx106-hal -f ../Makefile _libhal
|
make -C lx106-hal -f ../Makefile _libhal
|
||||||
|
|
||||||
_libhal:
|
_libhal:
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
PATH=$(TOOLCHAIN)/bin:$(PATH) ./configure --host=xtensa-lx106-elf --prefix=$(TOOLCHAIN)
|
PATH=$(TOOLCHAIN)/bin:$(PATH) ./configure --host=xtensa-lx106-elf --prefix=$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr
|
||||||
PATH=$(TOOLCHAIN)/bin:$(PATH) make
|
PATH=$(TOOLCHAIN)/bin:$(PATH) make
|
||||||
PATH=$(TOOLCHAIN)/bin:$(PATH) make install
|
PATH=$(TOOLCHAIN)/bin:$(PATH) make install
|
||||||
|
|
||||||
|
|
||||||
|
toolchain: $(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc
|
||||||
|
|
||||||
$(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc: crosstool-NG/ct-ng
|
$(TOOLCHAIN)/bin/xtensa-lx106-elf-gcc: crosstool-NG/ct-ng
|
||||||
make -C crosstool-NG -f ../Makefile _toolchain
|
make -C crosstool-NG -f ../Makefile _toolchain
|
||||||
|
|
||||||
@ -63,6 +69,9 @@ _toolchain:
|
|||||||
echo CT_STATIC_TOOLCHAIN=y >> .config
|
echo CT_STATIC_TOOLCHAIN=y >> .config
|
||||||
./ct-ng build
|
./ct-ng build
|
||||||
|
|
||||||
|
|
||||||
|
crosstool-NG: crosstool-NG/ct-ng
|
||||||
|
|
||||||
crosstool-NG/ct-ng: crosstool-NG/bootstrap
|
crosstool-NG/ct-ng: crosstool-NG/bootstrap
|
||||||
make -C crosstool-NG -f ../Makefile _ct-ng
|
make -C crosstool-NG -f ../Makefile _ct-ng
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user