Commits

Anonymous committed 273b4c5

Use CFLAGS in LDFLAGS
This makes the Makefile a bit shorter and less complicated.
---
Makefile | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

  • Participants
  • Parent commits e742216

Comments (0)

Files changed (1)

 endif
 
 ifeq ($(LTO), 1)
-  CFLAGS += -flto
+  CFLAGS += -flto -fuse-linker-plugin
 endif
 
 ifeq ($(USE_ESKYLINK), 1)
 CFLAGS += -ffunction-sections -fdata-sections
 
 ASFLAGS = $(PROCESSOR) $(INCLUDES)
-LDFLAGS = $(PROCESSOR) -Wl,-Map=$(PROG).map,--cref,--gc-sections
+LDFLAGS = $(CFLAGS) -Wl,-Map=$(PROG).map,--cref,--gc-sections
 
 ifeq ($(CLOAD), 1)
   LDFLAGS += -T scripts/STM32F103_32K_20K_FLASH_CLOAD.ld
   LDFLAGS += -T scripts/STM32F103_32K_20K_FLASH.ld
 endif
 
-ifeq ($(LTO), 1)
-  LDFLAGS += -Os -flto -fuse-linker-plugin
-endif
-
 #Program name
 PROG = cflie
 #Where to compile the .o