Changeset 2261


Ignore:
Timestamp:
Mar 11, 2008, 3:56:32 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Split the image loaders into sdl.c, imlib.c and opencv.c. We'll do something far better, but later.
Location:
libpipi/trunk/pipi
Files:
5 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/Makefile.am

    r2244 r2261  
    1111include_HEADERS = pipi.h
    1212
     13# Conditional sources
     14codec_cflags =
     15codec_libs =
     16codec_sources =
     17
     18# The main library
    1319lib_LTLIBRARIES = libpipi.la
    1420libpipi_la_SOURCES = \
     
    1622        pipi.h \
    1723        pipi_internals.h \
    18         io.c \
    1924        pixels.c \
     25        codec.c \
    2026        resize.c \
     27        $(codec_sources) \
    2128        $(NULL)
    22 libpipi_la_CFLAGS = $(CFLAGS_EXTRA)
    23 libpipi_la_LDFLAGS = $(LDFLAGS_EXTRA) \
     29libpipi_la_CFLAGS = $(codec_cflags)
     30libpipi_la_LDFLAGS = $(codec_libs) \
    2431        -no-undefined -version-number @LT_VERSION@
    2532
    2633if USE_SDL
    27 CFLAGS_EXTRA = `sdl-config --cflags`
    28 LDFLAGS_EXTRA = `sdl-config --libs` -lSDL_image
    29 else
    30 if USE_IMLIB2
    31 CFLAGS_EXTRA = @IMLIB2_CFLAGS@
    32 LDFLAGS_EXTRA = @IMLIB2_LIBS@
    33 else
    34 if USE_OPENCV
    35 CFLAGS_EXTRA = `opencv-config --cflags`
    36 LDFLAGS_EXTRA = `opencv-config --libs opencv highgui`
    37 endif
    38 endif
     34codec_cflags += `sdl-config --cflags`
     35codec_libs += `sdl-config --libs` -lSDL_image
     36codec_sources += codec/sdl.c
    3937endif
    4038
     39if USE_IMLIB2
     40codec_cflags += @IMLIB2_CFLAGS@
     41codec_libs += @IMLIB2_LIBS@
     42codec_sources += codec/imlib.c
     43endif
     44
     45if USE_OPENCV
     46codec_cflags += `opencv-config --cflags`
     47codec_libs += `opencv-config --libs opencv highgui`
     48codec_sources += codec/opencv.c
     49endif
     50
  • libpipi/trunk/pipi/pipi_internals.h

    r2228 r2261  
    1414
    1515/*
    16  * pipi_internals.h: internal types
     16 *  pipi_internals.h: internal types
    1717 */
    1818
     
    2727};
    2828
     29#ifdef USE_IMLIB2
     30pipi_image_t *pipi_load_imlib2(const char *name);
     31pipi_image_t *pipi_new_imlib2(int width, int height);
     32void pipi_free_imlib2(pipi_image_t *img);
     33void pipi_save_imlib2(pipi_image_t *img, const char *name);
     34#endif
     35
     36#ifdef USE_OPENCV
     37pipi_image_t *pipi_load_opencv(const char *name);
     38pipi_image_t *pipi_new_opencv(int width, int height);
     39void pipi_free_opencv(pipi_image_t *img);
     40void pipi_save_opencv(pipi_image_t *img, const char *name);
     41#endif
     42
     43#ifdef USE_SDL
     44pipi_image_t *pipi_load_sdl(const char *name);
     45pipi_image_t *pipi_new_sdl(int width, int height);
     46void pipi_free_sdl(pipi_image_t *img);
     47void pipi_save_sdl(pipi_image_t *img, const char *name);
     48#endif
     49
    2950#endif /* __PIPI_INTERNALS_H__ */
    3051
Note: See TracChangeset for help on using the changeset viewer.