From 32f430e69d434e77f82cf0b7a60a241bd56e9e52 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 30 May 2015 21:57:21 +0200 Subject: [PATCH] examples: remove cross-directory build dependencies. --- examples/Makefile.am | 2 +- examples/trifiller.c | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 7b41f77..2aff95c 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -7,7 +7,7 @@ if USE_CXX conio_snake = conio-snake endif -trifiller_SOURCES = trifiller.c ../src/common-image.c +trifiller_SOURCES = trifiller.c trifiller_CFLAGS = $(IMLIB2_CFLAGS) trifiller_LDFLAGS = $(IMLIB2_LIBS) trifiller_LDADD = ../caca/libcaca.la -lm diff --git a/examples/trifiller.c b/examples/trifiller.c index 5a06f23..b79ef6d 100644 --- a/examples/trifiller.c +++ b/examples/trifiller.c @@ -10,22 +10,11 @@ * http://www.wtfpl.net/ for more details. */ +/* This will include config.h and everything else */ +#include "../src/common-image.c" -#include "config.h" - -#if !defined(__KERNEL__) -# include -# include -#endif - -/* libcaca header */ -#include "caca.h" - -/* Image loading functions */ -#include "../src/common-image.h" - -/* M_PI / cos / sin */ -#include +#include /* fprintf */ +#include /* M_PI / cos / sin */ #define SQUARE_SIZE 20