Set DEBUG=1 for make to build with debug symbols and without optimizations.
This commit is contained in:
committed by
GitHub
parent
adc62bb1ea
commit
77fff3b9d9
10
Makefile
10
Makefile
@@ -50,11 +50,17 @@ OBJ = $(C_SRC:%.c=$(BUILDDIR)/%.c.o) $(CPP_SRC:%.cpp=$(BUILDDIR)/%.cpp.o) $(IMG:
|
||||
DEP = $(C_SRC:%.c=$(BUILDDIR)/%.c.d) $(CPP_SRC:%.cpp=$(BUILDDIR)/%.cpp.d)
|
||||
|
||||
DFLAGS = $(INCLUDE) -D_7ZIP_ST -DPACKAGE_VERSION=\"1.3.3\" -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -DENABLE_64_BIT_WORDS=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\"
|
||||
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-truncation -Wno-format-truncation -Wno-psabi -Wno-restrict -c -O3
|
||||
CFLAGS = $(DFLAGS) -Wall -Wextra -Wno-strict-aliasing -Wno-stringop-overflow -Wno-stringop-truncation -Wno-format-truncation -Wno-psabi -Wno-restrict -c
|
||||
LFLAGS = -lc -lstdc++ -lm -lrt $(IMLIB2_LIB) -Llib/bluetooth -lbluetooth -lpthread
|
||||
|
||||
OUTPUT_FILTER = sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):\([0-9]\+\):/\1(\2,\ \3):/g'
|
||||
|
||||
ifneq ($(DEBUG),1)
|
||||
CFLAGS += -O3
|
||||
else
|
||||
CFLAGS += -O0 -g -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifeq ($(PROFILING),1)
|
||||
DFLAGS += -DPROFILING
|
||||
endif
|
||||
@@ -63,7 +69,9 @@ $(BUILDDIR)/$(PRJ): $(OBJ)
|
||||
$(Q)$(info $@)
|
||||
$(Q)$(CC) -o $@ $+ $(LFLAGS)
|
||||
$(Q)cp $@ $@.elf
|
||||
ifneq ($(DEBUG),1)
|
||||
$(Q)$(STRIP) $@
|
||||
endif
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user