Add debug and strip modes to makefile

This commit is contained in:
Kevin Lange 2012-12-10 20:26:46 -08:00
parent 3335eee65f
commit 7ea68a6d92
2 changed files with 9 additions and 0 deletions

View File

@ -2,7 +2,13 @@ CC = i686-pc-toaru-gcc
CPP = i686-pc-toaru-g++
CFLAGS = -std=c99 -U__STRICT_ANSI__ -O3 -m32 -Wa,--32
CPPFLAGS = -O3 -m32 -Wa,--32
ifeq ($(DEBUG_MODE),1)
STRIP = true
EXTRAFLAGS = -g
else
STRIP = i686-pc-toaru-strip
EXTRAFLAGS = -s
endif
EXECUTABLES = $(patsubst %.c,../hdd/bin/%,$(wildcard *.c))
@ -51,5 +57,6 @@ clean:
${EXTRA_LIB_TARGETS}: $(TARGETDIR)% : %.c
@${BEG} "CC" "$< [w/extra libs]"
@${CC} -flto ${CFLAGS} ${EXTRAFLAGS} ${LOCAL_INC} ${EXTRA_LIB_INCLUDES} -o $@ $< ${LOCAL_LIBS} ${EXTRA_LIB_LIBRARIES} ${ERRORS}
@${STRIP} $@
@${END} "CC" "$< [w/extra libs]"

View File

@ -299,6 +299,8 @@ void set_focused_window(window_t * n_focused) {
wwt.left = 1;
send_window_event(focused->owner, WE_FOCUSCHG, &wwt);
make_top(focused);
} else {
focused = windows[0];
}
}