Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
e82e6e85
Commit
e82e6e85
authored
Jun 03, 2016
by
Johny Mattsson
Browse files
Cleaned up top-level Makefile.
Now doesn't recurse into the rtos-sdk for every subdir, does clean lwip, etc.
parent
b8d9ad16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
e82e6e85
...
@@ -3,22 +3,34 @@
...
@@ -3,22 +3,34 @@
#
#
.NOTPARALLEL
:
.NOTPARALLEL
:
# Get rid of most of the implicit rules by clearing the .SUFFIXES target
.SUFFIXES
:
# Get rid of the auto-checkout from old version control systems rules
%
:
%
,
v
%
:
RCS/%
,
v
%
:
RCS/%
%
:
s.%
%
:
SCCS/s.%
# Ensure we search "our" SDK before the tool-chain's SDK (if any)
# Ensure we search "our" SDK before the tool-chain's SDK (if any)
TOP_DIR
:=
$(
abspath
$(
dir
$(
lastword
$(MAKEFILE_LIST)
)))
TOP_DIR
:=
$(
abspath
$(
dir
$(
lastword
$(MAKEFILE_LIST)
)))
SDK_DIR
:=
$(TOP_DIR)
/rtos-sdk
SDKDIR
:=
$(TOP_DIR)
/rtos-sdk
LWIPDIR
:=
$(SDKDIR)
/third_party/lwip
# This is, sadly, the cleanest way to resolve the different non-standard
# This is, sadly, the cleanest way to resolve the different non-standard
# conventions for sized integers across the various components.
# conventions for sized integers across the various components.
BASIC_TYPES
=
-Du32_t
=
uint32_t
-Du16_t
=
uint16_t
-Du8_t
=
uint8_t
-Ds32_t
=
int32_t
-Ds16_t
=
int16_t
-Duint32
=
uint32_t
-Duint16
=
uint16_t
-Duint8
=
uint8_t
-Dsint32
=
int32_t
-Dsint16
=
int16_t
-Dsint8
=
int8_t
BASIC_TYPES
=
-Du32_t
=
uint32_t
-Du16_t
=
uint16_t
-Du8_t
=
uint8_t
-Ds32_t
=
int32_t
-Ds16_t
=
int16_t
-Duint32
=
uint32_t
-Duint16
=
uint16_t
-Duint8
=
uint8_t
-Dsint32
=
int32_t
-Dsint16
=
int16_t
-Dsint8
=
int8_t
# Include dirs, ensure the overrides come first
# Include dirs, ensure the overrides come first
INCLUDE_DIRS
=
$(TOP_DIR)
/sdk-overrides/include
$(SDK
_
DIR)
/include
$(SDK
_
DIR)
/include/espressif
$(SDK
_
DIR)
/include/lwip
$(SDK
_
DIR)
/include/lwip/ipv4
$(SDK
_
DIR)
/include/lwip/ipv6
$(SDK
_
DIR)
/extra_include
INCLUDE_DIRS
=
$(TOP_DIR)
/sdk-overrides/include
$(SDKDIR)
/include
$(SDKDIR)
/include/espressif
$(SDKDIR)
/include/lwip
$(SDKDIR)
/include/lwip/ipv4
$(SDKDIR)
/include/lwip/ipv6
$(SDKDIR)
/extra_include
# ... and we have to mark them all as system include dirs rather than the usual
# ... and we have to mark them all as system include dirs rather than the usual
# -I for user include dir, or the esp-open-sdk toolchain headers wreak havoc
# -I for user include dir, or the esp-open-sdk toolchain headers wreak havoc
CCFLAGS
:=
$(
addprefix
-isystem
,
$(INCLUDE_DIRS)
)
$(BASIC_TYPES)
CCFLAGS
:=
$(
addprefix
-isystem
,
$(INCLUDE_DIRS)
)
$(BASIC_TYPES)
LDFLAGS
:=
-L
$(SDK
_
DIR)
/lib
-L
$(SDK
_
DIR)
/ld
-L
$(
SDK_DIR)
/third_party/lwip
/.output/eagle/debug/lib
$(LDFLAGS)
LDFLAGS
:=
-L
$(SDKDIR)
/lib
-L
$(SDKDIR)
/ld
-L
$(
LWIPDIR)
/.output/eagle/debug/lib
$(LDFLAGS)
#############################################################
#############################################################
...
@@ -123,19 +135,22 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out
...
@@ -123,19 +135,22 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out
# Should be done in top-level makefile only
# Should be done in top-level makefile only
#
#
all
:
sdk_built
pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
all
:
pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
.PHONY
:
sdk_built
.PHONY
:
sdk_built
sdk_built
:
sdk_built
:
$(MAKE)
-C
$(SDK_DIR)
/third_party/lwip
SDK_PATH
=
$(SDK_DIR)
-j1
ifndef
PDIR
$(MAKE)
-C
$(LWIPDIR)
SDK_PATH
=
$(SDKDIR)
-j1
else
:
endif
clean
:
clean
:
$(
foreach
d,
$(SUBDIRS)
,
$(MAKE)
-C
$(d)
clean
;
)
$(
foreach
d,
$(SUBDIRS)
$(LWIPDIR)
,
$(MAKE)
-C
$(d)
clean
;
)
$(RM)
-r
$(ODIR)
/
$(TARGET)
/
$(FLAVOR)
$(RM)
-r
$(ODIR)
/
$(TARGET)
/
$(FLAVOR)
$(RM)
-r
"
$(TOP_DIR)
/sdk"
clobber
:
$(SPECIAL_CLOBBER)
clobber
:
$(SPECIAL_CLOBBER)
$(
foreach
d,
$(SUBDIRS)
,
$(MAKE)
-C
$(d)
clobber
;
)
$(
foreach
d,
$(SUBDIRS)
$(LWIPDIR)
,
$(MAKE)
-C
$(d)
clobber
;
)
$(RM)
-r
$(ODIR)
$(RM)
-r
$(ODIR)
flash
:
flash
:
...
@@ -145,7 +160,7 @@ else
...
@@ -145,7 +160,7 @@ else
$(ESPTOOL)
--port
$(ESPPORT)
write_flash 0x00000
$(FIRMWAREDIR)
0x00000.bin 0x10000
$(FIRMWAREDIR)
0x10000.bin
$(ESPTOOL)
--port
$(ESPPORT)
write_flash 0x00000
$(FIRMWAREDIR)
0x00000.bin 0x10000
$(FIRMWAREDIR)
0x10000.bin
endif
endif
.subdirs
:
|
sdk_built
.subdirs
:
sdk_built
@
set
-e
;
$(
foreach
d,
$(SUBDIRS)
,
$(MAKE)
-C
$(d)
;
)
@
set
-e
;
$(
foreach
d,
$(SUBDIRS)
,
$(MAKE)
-C
$(d)
;
)
ifneq
($(MAKECMDGOALS),clean)
ifneq
($(MAKECMDGOALS),clean)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment