Wie füge ich das Compile-Flag -g zu einer Make-Datei hinzu?

Ich habe ein C ++ - Programm, für das jemand anderes eine make-Datei erstellt hat. Ich möchte das Programm mit flag -g kompilieren, weiß aber nicht, wo ich es hinzufügen soll. Unten ist die make-Datei.

CC = g++
LOADLIBES = -lm
CFLAGS = -Wall -O2


SRC1 = Agent.cpp Breeder.cpp CandidateSolution.cpp \
    Cupid.cpp FateAgent.cpp Grid.cpp Reaper.cpp \
    fitness.cpp

SRC2 = main.cpp

SRC  = $(SRC1) $(SRC2)

OBJS = $(SRC1:.cpp = .o)

AUX = $(SRC1:.c = .h)


main: $(OBJS) 
#   $(CC) $(CFLAGS) -o $(SRC) $(AUX) 

.PHONY: clean
clean:
    rm -f *.o main

Wo soll ich hinzufügen, dass ich -g verwenden möchte?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage