summer restructuring:
* .h include only the strict minimum for their own parsing * this forces all files to include explicitment their needs and not count on far streched dependencies * this helps Makefile to rebuild only the minimum * according to this rule, most standalone .h are now gone * big app.h is gone * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway * all unrequired include were removed * split common/ into common/ (client+arm) and common_arm/ (os+bootloader) * bring zlib to common/ * bring stuff not really/not yet used in common back to armsrc/ or client/ * bring liblua into client/ * bring uart into client/ * move some portions of code around (dbprint, protocols,...) * rename unused files into *_disabled.[ch] to make it explicit * rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash * remove PrintAndLogDevice * move deprecated-hid-flasher from client to tools * Makefiles * treat deps in armsrc/ as in client/ * client: stop on warning (-Werror), same as for armsrc/ Tested on: * all standalone modes * Linux
This commit is contained in:
@@ -28,7 +28,7 @@ ENV_CFLAGS := $(CFLAGS)
|
||||
|
||||
platform = $(shell uname)
|
||||
|
||||
VPATH = ../common ../zlib ../uart
|
||||
VPATH = ../common ../common/zlib uart
|
||||
OBJDIR = obj
|
||||
|
||||
LDLIBS =
|
||||
@@ -44,18 +44,19 @@ ifneq ($(platform),Darwin)
|
||||
LDLIBS += -Wl,--as-needed -latomic -Wl,--no-as-needed
|
||||
endif
|
||||
|
||||
LUALIB = ../liblua/liblua.a
|
||||
LUALIBPATH = ./liblua
|
||||
LUALIB = $(LUALIBPATH)/liblua.a
|
||||
JANSSONLIBPATH = ./jansson
|
||||
JANSSONLIB = $(JANSSONLIBPATH)/libjansson.a
|
||||
MBEDTLSLIBPATH = ../common/mbedtls
|
||||
MBEDTLSLIB = $(MBEDTLSLIBPATH)/libmbedtls.a
|
||||
CBORLIBPATH = ./tinycbor
|
||||
CBORLIB = $(CBORLIBPATH)/tinycbor.a
|
||||
LIBS = -I../zlib -I../uart -I../liblua -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH)
|
||||
LIBS = -I../common/zlib -Iuart -I$(LUALIBPATH) -I$(MBEDTLSLIBPATH) -I$(JANSSONLIBPATH) -I$(CBORLIBPATH)
|
||||
INCLUDES_CLIENT = -I. -I../include -I../common -I/opt/local/include $(LIBS)
|
||||
LDFLAGS = $(ENV_LDFLAGS)
|
||||
|
||||
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -g -O3
|
||||
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -DPRESETS $(INCLUDES_CLIENT) -Wall -Werror -g -O3
|
||||
ifneq (,$(findstring MINGW,$(platform)))
|
||||
CFLAGS += -mno-ms-bitfields
|
||||
endif
|
||||
@@ -117,7 +118,7 @@ endif
|
||||
|
||||
# Flags to generate temporary dependency files
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(OBJDIR)/$*.Td
|
||||
# make temporary to final dependeny files after successful compilation
|
||||
# make temporary to final dependency files after successful compilation
|
||||
POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d
|
||||
|
||||
CORESRCS = uart_posix.c \
|
||||
@@ -237,7 +238,6 @@ CMDSRCS = crapto1/crapto1.c \
|
||||
scripting.c \
|
||||
cmdscript.c \
|
||||
pm3_bitlib.c \
|
||||
protocols.c \
|
||||
cmdcrc.c \
|
||||
reveng/preset.c \
|
||||
reveng/reveng.c \
|
||||
@@ -333,7 +333,7 @@ lualibs/mf_default_keys.lua : default_keys.dic
|
||||
|
||||
clean:
|
||||
$(Q)$(RM) $(CLEAN)
|
||||
$(Q)$(MAKE) --no-print-directory -C ../liblua clean
|
||||
$(Q)$(MAKE) --no-print-directory -C $(LUALIBPATH) clean
|
||||
$(Q)$(MAKE) --no-print-directory -C $(JANSSONLIBPATH) clean
|
||||
$(Q)$(MAKE) --no-print-directory -C $(MBEDTLSLIBPATH) clean
|
||||
$(Q)$(MAKE) --no-print-directory -C $(CBORLIBPATH) clean
|
||||
@@ -344,7 +344,7 @@ tarbin: $(BINS)
|
||||
|
||||
lua_build:
|
||||
$(info [*] MAKE liblua for $(LUAPLATFORM))
|
||||
$(Q)$(MAKE) --no-print-directory -C ../liblua $(LUAPLATFORM)
|
||||
$(Q)$(MAKE) --no-print-directory -C $(LUALIBPATH) $(LUAPLATFORM)
|
||||
|
||||
jansson_build:
|
||||
$(info [*] MAKE jansson)
|
||||
|
||||
Reference in New Issue
Block a user