Compile with debug info and do not strip if DEBUG is set (not evaluating its value...).

This commit is contained in:
flederwiesel 2019-11-11 10:10:51 +01:00
parent 1c16caf956
commit dc2311d87d

View file

@ -27,7 +27,7 @@
CC?=$(CCARCH)gcc CC?=$(CCARCH)gcc
STRIP?=$(CCARCH)strip STRIP?=$(CCARCH)strip
CFLAGS=-fPIC -O3 -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections CFLAGS=-fPIC $(if $(DEBUG),-O0 -g,-O3) -std=gnu99 -pedantic -Wall -Wextra -Wconversion -Werror -c -fmessage-length=0 -ffunction-sections -fdata-sections
LDFLAGS=-shared LDFLAGS=-shared
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
@ -53,7 +53,7 @@ all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS_OBJ) $(EXECUTABLE): $(OBJECTS_OBJ)
$(CC) $(LDFLAGS) $(OBJECTS_OBJ) -o $@ $(CC) $(LDFLAGS) $(OBJECTS_OBJ) -o $@
$(STRIP) $@ $(if $(DEBUG),,$(STRIP) $@)
obj/%.o: src/%.c $(INCLUDES_SRC) obj/%.o: src/%.c $(INCLUDES_SRC)