mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-09 03:41:41 +03:00
Add makefile
This commit is contained in:
parent
4e0ccaf9b2
commit
3661c54000
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
*.o
|
||||||
|
bin/
|
||||||
|
Makefile.local
|
||||||
|
.DS_Store
|
||||||
|
|
69
Makefile
Normal file
69
Makefile
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
include Makefile.local
|
||||||
|
|
||||||
|
TOOLCHAIN_PREFIX := xtensa-lx106-elf-
|
||||||
|
CC := $(TOOLCHAIN_PREFIX)gcc
|
||||||
|
AR := $(TOOLCHAIN_PREFIX)ar
|
||||||
|
LD := $(TOOLCHAIN_PREFIX)gcc
|
||||||
|
OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy
|
||||||
|
|
||||||
|
|
||||||
|
XTENSA_LIBS ?= $(shell $(CC) -print-sysroot)
|
||||||
|
|
||||||
|
|
||||||
|
OBJ_FILES := \
|
||||||
|
crypto/aes.o \
|
||||||
|
crypto/bigint.o \
|
||||||
|
crypto/hmac.o \
|
||||||
|
crypto/md2.o \
|
||||||
|
crypto/md5.o \
|
||||||
|
crypto/rc4.o \
|
||||||
|
crypto/rsa.o \
|
||||||
|
crypto/sha1.o \
|
||||||
|
ssl/asn1.o \
|
||||||
|
ssl/gen_cert.o \
|
||||||
|
ssl/loader.o \
|
||||||
|
ssl/os_port.o \
|
||||||
|
ssl/p12.o \
|
||||||
|
ssl/tls1.o \
|
||||||
|
ssl/tls1_clnt.o \
|
||||||
|
ssl/tls1_svr.o \
|
||||||
|
ssl/x509.o \
|
||||||
|
crypto/crypto_misc.o \
|
||||||
|
|
||||||
|
|
||||||
|
CPPFLAGS += -I$(XTENSA_LIBS)/include \
|
||||||
|
-I$(SDK_BASE)/include \
|
||||||
|
-Icrypto \
|
||||||
|
-Issl
|
||||||
|
|
||||||
|
LDFLAGS += -L$(XTENSA_LIBS)/lib \
|
||||||
|
-L$(XTENSA_LIBS)/arch/lib \
|
||||||
|
-L$(SDK_BASE)/lib
|
||||||
|
|
||||||
|
CFLAGS+=-std=c99 -DESP8266
|
||||||
|
|
||||||
|
CFLAGS += -Os -g -O2 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -D__ets__ -DICACHE_FLASH
|
||||||
|
BIN_DIR := bin
|
||||||
|
AXTLS_AR := $(BIN_DIR)/libaxtls.a
|
||||||
|
|
||||||
|
all: $(AXTLS_AR)
|
||||||
|
|
||||||
|
$(AXTLS_AR): | $(BIN_DIR)
|
||||||
|
|
||||||
|
$(AXTLS_AR): $(OBJ_FILES)
|
||||||
|
for file in $(OBJ_FILES); do \
|
||||||
|
$(OBJCOPY) \
|
||||||
|
--rename-section .text=.irom0.text \
|
||||||
|
--rename-section .literal=.irom0.literal \
|
||||||
|
$$file; \
|
||||||
|
done
|
||||||
|
$(AR) cru $@ $^
|
||||||
|
|
||||||
|
$(BIN_DIR):
|
||||||
|
mkdir -p $(BIN_DIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(OBJ_FILES) $(LWIP_AR)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all clean
|
3
Makefile.local.template
Normal file
3
Makefile.local.template
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Set this to SDK path and save as Makefile.local
|
||||||
|
SDK_BASE := $(HOME)/esp8266/sdk
|
||||||
|
|
BIN
crypto/aes.o
BIN
crypto/aes.o
Binary file not shown.
BIN
crypto/bigint.o
BIN
crypto/bigint.o
Binary file not shown.
BIN
crypto/hmac.o
BIN
crypto/hmac.o
Binary file not shown.
BIN
crypto/md2.o
BIN
crypto/md2.o
Binary file not shown.
BIN
crypto/md5.o
BIN
crypto/md5.o
Binary file not shown.
BIN
crypto/rc4.o
BIN
crypto/rc4.o
Binary file not shown.
BIN
crypto/rsa.o
BIN
crypto/rsa.o
Binary file not shown.
BIN
crypto/sha1.o
BIN
crypto/sha1.o
Binary file not shown.
BIN
ssl/asn1.o
BIN
ssl/asn1.o
Binary file not shown.
BIN
ssl/gen_cert.o
BIN
ssl/gen_cert.o
Binary file not shown.
BIN
ssl/loader.o
BIN
ssl/loader.o
Binary file not shown.
BIN
ssl/os_port.o
BIN
ssl/os_port.o
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user