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); +}