diff --git a/cogl-color.h b/cogl-color.h index 14c5d8413..56f75a86b 100644 --- a/cogl-color.h +++ b/cogl-color.h @@ -1,3 +1,7 @@ +#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __COGL_COLOR_H__ #define __COGL_COLOR_H__ diff --git a/cogl-fixed.h b/cogl-fixed.h index b1542bcc3..1e2709572 100644 --- a/cogl-fixed.h +++ b/cogl-fixed.h @@ -1,3 +1,7 @@ +#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __COGL_FIXED_H__ #define __COGL_FIXED_H__ diff --git a/cogl.h.in b/cogl.h.in index 3f23621f9..5b57a7e8f 100644 --- a/cogl.h.in +++ b/cogl.h.in @@ -42,6 +42,8 @@ #ifndef __COGL_H__ #define __COGL_H__ +#define __COGL_H_INSIDE__ + #include #include @@ -1587,4 +1589,6 @@ void cogl_draw_buffer (CoglBufferTarget target, G_END_DECLS +#undef __COGL_H_INSIDE__ + #endif /* __COGL_H__ */ diff --git a/common/Makefile.am b/common/Makefile.am index 5a52418be..7e3d7dfc0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -5,6 +5,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/gl/Makefile.am b/gl/Makefile.am index 2b2273078..d2a1b4a16 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/gles/Makefile.am b/gles/Makefile.am index 1ac969ec3..29e25ddd2 100644 --- a/gles/Makefile.am +++ b/gles/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS)