1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-07 16:23:38 +03:00

Add makefile

This commit is contained in:
Ivan Grokhotkov 2015-08-30 13:39:31 +03:00
parent 4e0ccaf9b2
commit 3661c54000
16 changed files with 77 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.o
bin/
Makefile.local
.DS_Store

69
Makefile Normal file
View 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
View File

@ -0,0 +1,3 @@
# Set this to SDK path and save as Makefile.local
SDK_BASE := $(HOME)/esp8266/sdk

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
ssl/p12.o

Binary file not shown.