From ad0075c160be53698ace3fe20d8ee65916b9a775 Mon Sep 17 00:00:00 2001 From: Barry Harris <44396066+barry65536@users.noreply.github.com> Date: Fri, 9 Mar 2012 14:07:59 +0000 Subject: [PATCH] Add a makefile INCLUDE_LIB_PNGH to allow not including png.h in burner.h --- makefile | 3 +++ makefile.mingw | 4 ++++ makefile.vc | 4 ++++ src/burner/burner.h | 4 +++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index f22172ff0..b9036cf93 100644 --- a/makefile +++ b/makefile @@ -54,6 +54,9 @@ PERL = 1 # Endianness LSB_FIRST = 1 +# Include png.h from burner.h +INCLUDE_LIB_PNGH = 1 + # # execute an appropriate system-specific makefile diff --git a/makefile.mingw b/makefile.mingw index 210548869..fa424b826 100644 --- a/makefile.mingw +++ b/makefile.mingw @@ -282,6 +282,10 @@ ifdef LSB_FIRST DEF := $(DEF) -DLSB_FIRST endif +ifdef INCLUDE_LIB_PNGH + DEF := $(DEF) -DINCLUDE_LIB_PNGH +endif + ifdef BUILD_A68K DEF := $(DEF) -DBUILD_A68K endif diff --git a/makefile.vc b/makefile.vc index d969b5645..874a0a7d4 100644 --- a/makefile.vc +++ b/makefile.vc @@ -196,6 +196,10 @@ ifdef LSB_FIRST DEF := $(DEF) /DLSB_FIRST endif +ifdef INCLUDE_LIB_PNGH + DEF := $(DEF) /DINCLUDE_LIB_PNGH +endif + ifdef BUILD_A68K DEF := $(DEF) /DBUILD_A68K endif diff --git a/src/burner/burner.h b/src/burner/burner.h index c609642c5..98db19a7b 100644 --- a/src/burner/burner.h +++ b/src/burner/burner.h @@ -42,7 +42,9 @@ typedef struct tagIMAGE { #include "burner_xbox.h" #endif -#include "png.h" +#if defined (INCLUDE_LIB_PNGH) + #include "png.h" +#endif // --------------------------------------------------------------------------- // OS independent functionality