From a6e91bf63f677096b75545360c36fe5fcd54eb89 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 27 Mar 2015 18:15:00 +1000 Subject: [PATCH] * Makefile --- src/Makefile | 4 ++++ src/sampler-test.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/sampler-test.c diff --git a/src/Makefile b/src/Makefile index d570c4d..71b45f2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -28,6 +28,10 @@ utils: util util-static imdb_1to2: imdb_1to2.c gcc $(CFLAGS) $(CPPFLAGS) -o $@ $^ +FLAGS=$(shell GraphicsMagickWand-config --cppflags --ldflags --libs) +sampler-test: sampler.c sampler-test.c + gcc $(CFLAGS) $(CPPFLAGS) $(FLAGS) -o $@ $^ + clean: rm -f *.o rm -f imdb_?to? diff --git a/src/sampler-test.c b/src/sampler-test.c new file mode 100644 index 0000000..2bd9640 --- /dev/null +++ b/src/sampler-test.c @@ -0,0 +1,15 @@ +#include "common.h" +#include "database.h" +#include "sampler.h" + +int main(int argc, char **argv) +{ + char * const source = "sample.png"; + imdb_rec_t rec; + int ret = 0; + + memset(&rec, 0x0, sizeof(imdb_rec_t)); + ret = imdb_sample(&rec, source); + + exit(ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE); +}