Ahoj mám tento makefile kam mám přesně přidat parametr -g abych do kompilace zahrnul symboly pro debugging? Zkoušel jsem to do cglags bohužel bez výsledku. Předem děkuji za odpověď.
# Global definitions
PREFIX = /scratchbox/users/figa/targets/FREMANTLE_ARMEL/
CC = $(PREFIX)/usr/bin/gcc-4.2
STRIP = $(PREFIX)/usr/bin/strip
OBJS = main.o cpu.o memory.u video.o input.o sound.o gui.o \
cheats.o zip.o cpu_threaded.z \
arm_stub.o
BIN = bin
# Platform specific definitions
VPATH += ..
CFLAGS += -DARM_ARCH -DARM_BUILD -DPC_BUILD
# NOTE: -funroll-loops will slow down compiling considerably
# -fno-common was required to get games to start
# -finline-functions breaks cpu_threaded.c
# -fno-strength-reduce is needed to save time compiling
# cpu_threaded.c
CFLAGS += -O3 -std=c99 -msoft-float -funsigned-char -fno-common \
-fstrength-reduce -falign-functions -fomit-frame-pointer \
-ffast-math -fexpensive-optimizations -finline \
-fstrict-aliasing -finline-functions -fweb -fno-builtin
INCLUDES = `/scratchbox/users/figa/home/figa/workspace/gpsp/SDL/bin/sdl-config --cflags` -I/scratchbox/users/figa/home/figa/workspace/gpsp/SDL//include
LIBS = `/scratchbox/users/figa/home/figa/workspace/gpsp/SDL/bin/sdl-config --libs` \
-lm -ldl -lpthread -lasound -lz -static
SDL_LIBS=-L/scratchbox/users/figa/home/figa/workspace/gpsp/SDL//lib -Wl,-rpath,/scratchbox/users/figa/home/figa/workspace/gpsp/SDL//lib -lSDL -lpthread -ldl -lasound -lm
SDL_CFLAGS=-I/scratchbox/users/figa/home/figa/workspace/gpsp/SDL//include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
# Compilation:
.SUFFIXES: .c
%.z: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
%.u: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
%.o: %.S
$(CC) $(ASFLAGS) $(INCLUDES) -c -o $@ $<
all: $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(BIN)
$(STRIP) $(BIN)
clean:
rm -f *.o *.u *.z $(BIN)