Unverified Commit 98c2c052 authored by Terry Ellison's avatar Terry Ellison Committed by GitHub
Browse files

Dev make cleanup (#2842)

parent f7a545b9
...@@ -36,9 +36,5 @@ endif ...@@ -36,9 +36,5 @@ endif
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
INCLUDES += -I ../platform
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -38,9 +38,6 @@ STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -include config_ext.h ...@@ -38,9 +38,6 @@ STD_CFLAGS= -std=gnu11 -Wimplicit -Wno-undef -include config_ext.h
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include INCLUDES += -I .
INCLUDES += -I ./
INCLUDES += -I ../libc
INCLUDES += -I ../platform
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -36,9 +36,6 @@ endif ...@@ -36,9 +36,6 @@ endif
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -38,13 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit ...@@ -38,13 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ./include
INCLUDES += -I ../include
INCLUDES += -I ../../include
INCLUDES += -I ../libc
INCLUDES += -I ../platform
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -40,11 +40,7 @@ DEFINES += -DU8X8_USE_PINS -DU8G2_USE_LARGE_FONTS -DU8X8_WITH_USER_PTR ...@@ -40,11 +40,7 @@ DEFINES += -DU8X8_USE_PINS -DU8G2_USE_LARGE_FONTS -DU8X8_WITH_USER_PTR
CSRCS := $(wildcard u8g2/src/clib/*.c *.c) CSRCS := $(wildcard u8g2/src/clib/*.c *.c)
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I u8g2/src/clib INCLUDES += -I u8g2/src/clib
INCLUDES += -I ../libc
INCLUDES += -I ../lua
INCLUDES += -I ../platform
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -40,10 +40,7 @@ DEFINES += -DUSE_PIN_LIST ...@@ -40,10 +40,7 @@ DEFINES += -DUSE_PIN_LIST
CSRCS := $(wildcard ucg/src/clib/*.c *.c) CSRCS := $(wildcard ucg/src/clib/*.c *.c)
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ucg/src/clib INCLUDES += -I ucg/src/clib
INCLUDES += -I ./
INCLUDES += -I ../libc
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -38,12 +38,6 @@ DEFINES += -DESP_INIT_DATA_DEFAULT="\"$(SDK_DIR)/bin/esp_init_data_default_v05.b ...@@ -38,12 +38,6 @@ DEFINES += -DESP_INIT_DATA_DEFAULT="\"$(SDK_DIR)/bin/esp_init_data_default_v05.b
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../../include/ets
INCLUDES += -I ../libc
INCLUDES += -I ../platform
INCLUDES += -I ../lua
INCLUDES += -I ../spiffs INCLUDES += -I ../spiffs
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
// overflows. The downside is that it does not implement a wide range // overflows. The downside is that it does not implement a wide range
// of formatting characters. // of formatting characters.
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h> #include <stddef.h>
......
...@@ -37,9 +37,6 @@ endif ...@@ -37,9 +37,6 @@ endif
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
...@@ -38,12 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit ...@@ -38,12 +38,6 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
# Required for each makefile to inherit from the parent # Required for each makefile to inherit from the parent
# #
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ./include
INCLUDES += -I ../include
INCLUDES += -I ../libc
INCLUDES += -I ../../include
PDIR := ../$(PDIR) PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile sinclude $(PDIR)Makefile
#ifndef _SDKOVERRIDES_C_TYPES_H_ #ifndef _SDKOVERRIDES_C_TYPES_H_
#define _SDKOVERRIDES_C_TYPES_H_ #define _SDKOVERRIDES_C_TYPES_H_
......
../../app/include/lwip/app/espconn.h
\ No newline at end of file
#include <stdlib.h> #include <stdlib.h>
#define MEM_DEFAULT_USE_DRAM
#include_next "mem.h" #include_next "mem.h"
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
#define USE_OPTIMIZE_PRINTF
#include_next "osapi.h" #include_next "osapi.h"
......
...@@ -7,7 +7,7 @@ LUASOURCE ?= ../local/lua ...@@ -7,7 +7,7 @@ LUASOURCE ?= ../local/lua
FLASHSIZE ?= 4mb 32mb 8mb FLASHSIZE ?= 4mb 32mb 8mb
FLASH_SW = -S FLASH_SW = -S
SUBDIRS = SUBDIRS =
APP_DIR = ../app
OBJDUMP = $(or $(shell which objdump),xtensa-lx106-elf-objdump) OBJDUMP = $(or $(shell which objdump),xtensa-lx106-elf-objdump)
############################################################# #############################################################
...@@ -20,23 +20,23 @@ SPIFFSFILES ?= $(patsubst $(FSSOURCE)/%,%,$(shell find $(FSSOURCE)/ -name '*' '! ...@@ -20,23 +20,23 @@ SPIFFSFILES ?= $(patsubst $(FSSOURCE)/%,%,$(shell find $(FSSOURCE)/ -name '*' '!
# Get the filesize of /bin/0x10000.bin and SPIFFS sizing # Get the filesize of /bin/0x10000.bin and SPIFFS sizing
# #
FLASH_FS_SIZE := $(shell $(CC) -E -dM - <../app/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3) FLASH_FS_SIZE := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_MAX_FILESYSTEM_SIZE| cut -d ' ' -f 3)
ifneq ($(strip $(FLASH_FS_SIZE)),) ifneq ($(strip $(FLASH_FS_SIZE)),)
FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE)) FLASHSIZE = $(shell printf "0x%x" $(FLASH_FS_SIZE))
FLASH_SW = -c FLASH_SW = -c
endif endif
FLASH_FS_LOC := $(shell $(CC) -E -dM - <../app/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3) FLASH_FS_LOC := $(shell $(CC) -E -dM - <$(APP_DIR)/include/user_config.h | grep SPIFFS_FIXED_LOCATION| cut -d ' ' -f 3)
ifeq ($(strip $(FLASH_FS_LOC)),) ifeq ($(strip $(FLASH_FS_LOC)),)
FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t ../app/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000))) FLASH_FS_LOC := $(shell printf "0x%x" $$((0x$(shell $(OBJDUMP) -t $(APP_DIR)/.output/eagle/debug/image/eagle.app.v6.out |grep " _flash_used_end" |cut -f1 -d" ") - 0x40200000)))
else else
FLASH_FS_LOC := $(shell printf "0x%x" $(FLASH_FS_LOC)) FLASH_FS_LOC := $(shell printf "0x%x" $(FLASH_FS_LOC))
endif endif
LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua) LFSSOURCES := $(wildcard $(LUASOURCE)/*.lua)
BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <../app/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l) BUILD_TYPE := $(shell $(CC) $(EXTRA_CCFLAGS) -E -dM - <$(APP_DIR)/include/user_config.h | grep LUA_NUMBER_INTEGRAL | wc -l)
ifeq ($(BUILD_TYPE),0) ifeq ($(BUILD_TYPE),0)
LUAC_CROSS := ../luac.cross LUAC_CROSS := ../luac.cross
else else
......
APP_DIR = ../../app
summary ?= @true summary ?= @true
CC =gcc CC =gcc
SRCS=\ SRCS=\
main.c \ main.c \
../../app/spiffs/spiffs_cache.c ../../app/spiffs/spiffs_check.c ../../app/spiffs/spiffs_gc.c ../../app/spiffs/spiffs_hydrogen.c ../../app/spiffs/spiffs_nucleus.c $(APP_DIR)/spiffs/spiffs_cache.c $(APP_DIR)/spiffs/spiffs_check.c $(APP_DIR)/spiffs/spiffs_gc.c $(APP_DIR)/spiffs/spiffs_hydrogen.c $(APP_DIR)/spiffs/spiffs_nucleus.c
CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -I. -I../../app/spiffs -I../../app/include -DNODEMCU_SPIFFS_NO_INCLUDE --include spiffs_typedefs.h -Ddbg_printf=printf CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -I. -I$(APP_DIR)/spiffs -I$(APP_DIR)/include -DNODEMCU_SPIFFS_NO_INCLUDE --include spiffs_typedefs.h -Ddbg_printf=printf
spiffsimg: $(SRCS) spiffsimg: $(SRCS)
$(summary) HOSTCC $(CURDIR)/$< $(summary) HOSTCC $(CURDIR)/$<
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment