Description: use exported CFLAGS & CPPFLAGS
Forwarded: no
Author: Sébastien Noel <sebastien@twolife.be>
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@
 
 # Set target, configuration, version and destination folders
 
+CFLAGS += $(CPPFLAGS)
+
 PLATFORM := $(shell uname -s)
 ifneq ($(findstring MINGW,$(PLATFORM)),)
 PLATFORM := windows32
@@ -764,7 +766,7 @@
 	
 $(PB12_COMPRESS): BootROMs/pb12.c
 	-@$(MKDIR) -p $(dir $@)
-	$(NATIVE_CC) -std=c99 -Wall -Werror $< -o $@
+	$(NATIVE_CC) $(CFLAGS) -std=c99 -Wall -Werror $(LDFLAGS) $< -o $@
 
 $(BIN)/BootROMs/cgb0_boot.bin: BootROMs/cgb_boot.asm
 $(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
@@ -779,7 +781,7 @@
 
 # Libretro Core (uses its own build system)
 libretro:
-	CC=$(CC) CFLAGS="$(WARNINGS)" $(MAKE) -C libretro BOOTROMS_DIR=$(abspath $(BOOTROMS_DIR)) BIN=$(abspath $(BIN))
+	CC=$(CC) CFLAGS="$(WARNINGS) $(DEBCFLAGS)" $(MAKE) -C libretro BOOTROMS_DIR=$(abspath $(BOOTROMS_DIR)) BIN=$(abspath $(BIN))
 
 # Install for Linux, and other FreeDesktop platforms.
 ifneq ($(FREEDESKTOP),)
