mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Another Makefile cleaning
This commit is contained in:
parent
68c7aa108a
commit
834357fb4f
2 changed files with 3 additions and 58 deletions
57
src/Makefile
57
src/Makefile
|
@ -345,33 +345,6 @@ ifeq ($(DSM2), PPM)
|
||||||
CPPDEFS += -DDSM2 -DDSM2_PPM
|
CPPDEFS += -DDSM2 -DDSM2_PPM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------- Compiler Options C ----------------
|
|
||||||
# -g*: generate debugging information
|
|
||||||
# -O*: optimization level
|
|
||||||
# -f...: tuning, see GCC manual and avr-libc documentation
|
|
||||||
# -Wall...: warning level
|
|
||||||
# -Wa,...: tell GCC to pass this to the assembler.
|
|
||||||
# -adhlns...: create assembler listing
|
|
||||||
CFLAGS = -g$(DEBUG)
|
|
||||||
CFLAGS += $(CDEFS)
|
|
||||||
CFLAGS += -O$(OPT)
|
|
||||||
#CFLAGS += -mint8
|
|
||||||
#CFLAGS += -mshort-calls
|
|
||||||
CFLAGS += -funsigned-char
|
|
||||||
CFLAGS += -funsigned-bitfields
|
|
||||||
CFLAGS += -fpack-struct
|
|
||||||
CFLAGS += -fshort-enums
|
|
||||||
#CFLAGS += -fno-unit-at-a-time
|
|
||||||
CFLAGS += -Wall
|
|
||||||
CFLAGS += -Wstrict-prototypes
|
|
||||||
CFLAGS += -Wundef
|
|
||||||
#CFLAGS += -Wunreachable-code
|
|
||||||
#CFLAGS += -Wsign-compare
|
|
||||||
CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
|
|
||||||
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
|
||||||
CFLAGS += $(CSTANDARD)
|
|
||||||
CFLAGS += -fwhole-program
|
|
||||||
|
|
||||||
#---------------- Compiler Options C++ ----------------
|
#---------------- Compiler Options C++ ----------------
|
||||||
# -g*: generate debugging information
|
# -g*: generate debugging information
|
||||||
# -O*: optimization level
|
# -O*: optimization level
|
||||||
|
@ -393,7 +366,6 @@ CPPFLAGS += -O$(OPT)
|
||||||
CPPFLAGS += -Wall
|
CPPFLAGS += -Wall
|
||||||
CPPFLAGS += -Wno-strict-aliasing
|
CPPFLAGS += -Wno-strict-aliasing
|
||||||
#CPPFLAGS += -Wstrict-prototypes
|
#CPPFLAGS += -Wstrict-prototypes
|
||||||
#CFLAGS += -Wundef
|
|
||||||
#CPPFLAGS += -Wunreachable-code
|
#CPPFLAGS += -Wunreachable-code
|
||||||
#CPPFLAGS += -Wsign-compare
|
#CPPFLAGS += -Wsign-compare
|
||||||
#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
|
#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
|
||||||
|
@ -402,10 +374,7 @@ CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||||
|
|
||||||
GCCVERSIONGTE462 := $(shell expr 4.6.2 \<= `$(CC) -dumpversion`)
|
GCCVERSIONGTE462 := $(shell expr 4.6.2 \<= `$(CC) -dumpversion`)
|
||||||
ifeq ($(GCCVERSIONGTE462),1)
|
ifeq ($(GCCVERSIONGTE462),1)
|
||||||
CFLAGS += -flto
|
|
||||||
CPPFLAGS += -flto
|
CPPFLAGS += -flto
|
||||||
else
|
|
||||||
CFLAGS += --combine
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AVRGCCFLAGS = -fno-inline-small-functions
|
AVRGCCFLAGS = -fno-inline-small-functions
|
||||||
|
@ -567,16 +536,6 @@ MSG_ASSEMBLING = Assembling:
|
||||||
MSG_CLEANING = Cleaning project:
|
MSG_CLEANING = Cleaning project:
|
||||||
MSG_CREATING_LIBRARY = Creating library:
|
MSG_CREATING_LIBRARY = Creating library:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Define all object files.
|
|
||||||
OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
|
|
||||||
|
|
||||||
# Define all listing files.
|
|
||||||
LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler flags to generate dependency files.
|
# Compiler flags to generate dependency files.
|
||||||
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
|
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
|
||||||
|
|
||||||
|
@ -763,8 +722,6 @@ extcoff: $(TARGET).elf
|
||||||
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
||||||
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create final output files (.hex, .eep) from ELF output file.
|
# Create final output files (.hex, .eep) from ELF output file.
|
||||||
%.hex: %.elf
|
%.hex: %.elf
|
||||||
@echo
|
@echo
|
||||||
|
@ -820,24 +777,12 @@ clean_list :
|
||||||
$(REMOVE) *.d
|
$(REMOVE) *.d
|
||||||
$(REMOVEDIR) .dep
|
$(REMOVEDIR) .dep
|
||||||
|
|
||||||
|
|
||||||
# Create object files directory
|
|
||||||
$(shell mkdir $(OBJDIR) 2>/dev/null)
|
|
||||||
|
|
||||||
|
|
||||||
# Include the dependency files.
|
# Include the dependency files.
|
||||||
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
|
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
|
||||||
|
|
||||||
|
|
||||||
# Listing of phony targets.
|
|
||||||
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
|
||||||
build elf hex eep lss sym coff extcoff \
|
|
||||||
clean clean_list program debug gdb-config stamp_header
|
|
||||||
|
|
||||||
|
|
||||||
#### GOOGLE TESTS
|
#### GOOGLE TESTS
|
||||||
|
|
||||||
GTEST_DIR = ../gtest-1.6.0/
|
GTEST_DIR = ../gtest-1.6.0
|
||||||
|
|
||||||
# Where to find user code.
|
# Where to find user code.
|
||||||
USER_DIR = ./
|
USER_DIR = ./
|
||||||
|
|
|
@ -442,7 +442,7 @@ void menuProcModel(uint8_t event)
|
||||||
uint16_t timer_val = timer->val;
|
uint16_t timer_val = timer->val;
|
||||||
switch (m_posHorz) {
|
switch (m_posHorz) {
|
||||||
case 0:
|
case 0:
|
||||||
CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS+2*(MAX_PSWITCH+NUM_CSW));
|
CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
|
@ -1762,7 +1762,7 @@ void menuProcFunctionSwitches(uint8_t event)
|
||||||
case 0:
|
case 0:
|
||||||
putsSwitches(1*FW, y, sd->swtch, attr);
|
putsSwitches(1*FW, y, sd->swtch, attr);
|
||||||
if (active) {
|
if (active) {
|
||||||
CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH+1);
|
CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue