Skip to content

Commit

Permalink
Merge branch 'refactor'
Browse files Browse the repository at this point in the history
seperate out src
  • Loading branch information
whatdoineed2do/Ray committed Jan 17, 2024
2 parents b09ee7a + 064be68 commit 69736cf
Show file tree
Hide file tree
Showing 35 changed files with 72 additions and 47 deletions.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ AC_PROG_INSTALL
LT_INIT
PKG_PROG_PKG_CONFIG

AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])

PKG_CHECK_MODULES(IMAGEMAGICK, [Magick++ >= 6.9.9])
PKG_CHECK_MODULES(EXIV, [exiv2 >= 0.25])
PKG_CHECK_MODULES(AVFORMAT, [libavformat >= 57.71.100])
Expand All @@ -32,6 +34,9 @@ fi
AC_CONFIG_FILES([
Makefile
src/Makefile
src/lib/Makefile
src/cat/Makefile
src/extract/Makefile
tests/Makefile
])
AC_OUTPUT
48 changes: 3 additions & 45 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,46 +1,4 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib cat extract

AM_CPPFLAGS = -DHAVE_SAMPLE_ICC -DNEED_UCHAR_UINT_T
AM_CXXFLAGS = -std=c++17 $(IMAGEMAGICK_CFLAGS) $(EXIV_CFLAGS) $(SAMPLEICC_CFLAGS) -Wno-deprecated -Wno-pointer-arith -fopenmp -pthread
AM_LDFLAGS = $(IMAGEMAGICK_LIBS) $(EXIV_LIBS) -fopenmp -pthread

noinst_LTLIBRARIES = libimgcat_helper.la libimgcat.la

bin_PROGRAMS = imgcat imgprextr

libimgcat_helper_la_CPPFLAGS = $(AM_CPPFLAGS)
libimgcat_helper_la_CXXFLAGS = $(AM_CXXFLAGS)
libimgcat_helper_la_LDFLAGS = $(AM_LDFLAGS)
libimgcat_helper_la_LIBADD = $(SAMPLEICC_LIBS)
libimgcat_helper_la_SOURCES = \
ICCprofiles.c \
version.cc

libimgcat_la_CPPFLAGS = $(AM_CPPFLAGS)
libimgcat_la_CXXFLAGS = $(AM_CXXFLAGS) $(FFMPEGTHUMB_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(AVCODEC_CFLAGS) $(AVFILTER_CFLAGS)
libimgcat_la_LDFLAGS = $(AM_LDFLAGS) $(FFMPEGTHUMB_LIBS) $(AVFORMAT_LIBS) $(AVFILTER_LIBS) $(AVUTIL_LIBS) $(AVCODEC_LIBS)
libimgcat_la_LIBADD = $(SAMPLEICC_LIBS)
libimgcat_la_SOURCES = \
ImgData.cc \
ImgMetaParser.cc \
ImgExifParser.cc \
ImgOut.cc \
ImgOutJson.cc \
ImgHtml.cc \
ImgHtmlJG.cc \
ImgAVFmtParser.cc \
ImgIdx.cc \
ImgKey.cc \
ImgThumbGen.cc

imgcat_CPPFLAGS = $(AM_CPPFLAGS)
imgcat_CXXFLAGS = $(AM_CXXFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(FFMPEGTHUMB_CFLAGS)
imgcat_LDFLAGS = $(AM_LDFLAGS) $(FFMPEGTHUMB_LIBS) $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) -lpng -ljpeg
imgcat_LDADD = $(SAMPLEICC_LIBS) libimgcat.la libimgcat_helper.la
imgcat_SOURCES = imgcat.cc

imgprextr_CPPFLAGS = $(AM_CPPFLAGS)
imgprextr_CXXFLAGS = $(AM_CXXFLAGS)
imgprextr_LDFLAGS = $(AM_LDFLAGS)
imgprextr_LDADD = $(SAMPLEICC_LIBS) libimgcat_helper.la
imgprextr_SOURCES = imgprextr.cc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions src/cat/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

AM_CPPFLAGS = -DHAVE_SAMPLE_ICC -DNEED_UCHAR_UINT_T
AM_CXXFLAGS = $(IMAGEMAGICK_CFLAGS) $(EXIV_CFLAGS) $(SAMPLEICC_CFLAGS) -I../lib -Wno-deprecated -Wno-pointer-arith -fopenmp -pthread
AM_LDFLAGS = $(IMAGEMAGICK_LIBS) $(EXIV_LIBS) -fopenmp -pthread -L../lib

noinst_LTLIBRARIES = libimgcat.la

bin_PROGRAMS = imgcat

libimgcat_la_CPPFLAGS = $(AM_CPPFLAGS)
libimgcat_la_CXXFLAGS = $(AM_CXXFLAGS) $(FFMPEGTHUMB_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(AVCODEC_CFLAGS) $(AVFILTER_CFLAGS)
libimgcat_la_LDFLAGS = $(AM_LDFLAGS) $(FFMPEGTHUMB_LIBS) $(AVFORMAT_LIBS) $(AVFILTER_LIBS) $(AVUTIL_LIBS) $(AVCODEC_LIBS)
libimgcat_la_LIBADD = $(SAMPLEICC_LIBS)
libimgcat_la_SOURCES = \
ImgData.cc \
ImgMetaParser.cc \
ImgExifParser.cc \
ImgOut.cc \
ImgOutJson.cc \
ImgHtml.cc \
ImgHtmlJG.cc \
ImgAVFmtParser.cc \
ImgIdx.cc \
ImgKey.cc \
ImgThumbGen.cc

imgcat_CPPFLAGS = $(AM_CPPFLAGS)
imgcat_CXXFLAGS = $(AM_CXXFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(FFMPEGTHUMB_CFLAGS)
imgcat_LDFLAGS = $(AM_LDFLAGS) $(FFMPEGTHUMB_LIBS) $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) -lpng -ljpeg
imgcat_LDADD = $(SAMPLEICC_LIBS) libimgcat.la -limgcat_helper
imgcat_SOURCES = imgcat.cc
File renamed without changes.
15 changes: 15 additions & 0 deletions src/extract/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

AM_CPPFLAGS = -DHAVE_SAMPLE_ICC -DNEED_UCHAR_UINT_T
AM_CXXFLAGS = $(IMAGEMAGICK_CFLAGS) $(EXIV_CFLAGS) $(SAMPLEICC_CFLAGS) -I../lib -Wno-deprecated -Wno-pointer-arith -fopenmp -pthread
AM_LDFLAGS = $(IMAGEMAGICK_LIBS) $(EXIV_LIBS) -L../lib -fopenmp -pthread

noinst_LTLIBRARIES =

bin_PROGRAMS = imgprextr

imgprextr_CPPFLAGS = $(AM_CPPFLAGS)
imgprextr_CXXFLAGS = $(AM_CXXFLAGS)
imgprextr_LDFLAGS = $(AM_LDFLAGS)
imgprextr_LDADD = $(SAMPLEICC_LIBS) -limgcat_helper
imgprextr_SOURCES = imgprextr.cc
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions src/lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

AM_CPPFLAGS = -DHAVE_SAMPLE_ICC -DNEED_UCHAR_UINT_T
AM_CXXFLAGS = $(IMAGEMAGICK_CFLAGS) $(EXIV_CFLAGS) $(SAMPLEICC_CFLAGS) -Wno-deprecated -Wno-pointer-arith -fopenmp -pthread
AM_LDFLAGS = $(IMAGEMAGICK_LIBS) $(EXIV_LIBS)

noinst_LTLIBRARIES = libimgcat_helper.la

libimgcat_helper_la_CPPFLAGS = $(AM_CPPFLAGS)
libimgcat_helper_la_CXXFLAGS = $(AM_CXXFLAGS)
libimgcat_helper_la_LDFLAGS = $(AM_LDFLAGS)
libimgcat_helper_la_LIBADD = $(SAMPLEICC_LIBS)
libimgcat_helper_la_SOURCES = \
ICCprofiles.c \
version.cc
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ bin_PROGRAMS = imagickICCconvert avinfo exiv
imagickICCconvert_CPPFLAGS = $(AM_CPPFLAGS)
imagickICCconvert_CXXFLAGS = $(AM_CXXFLAGS) $(IMAGEMAGICK_CFLAGS)
imagickICCconvert_LDFLAGS = $(IMAGEMAGICK_LIBS)
imagickICCconvert_LDADD = ../src/libimgcat.la
imagickICCconvert_LDADD = ../src/cat/libimgcat.la
imagickICCconvert_SOURCES = imagickICCconvert.cc

avinfo_CPPFLAGS = $(AM_CPPFLAGS)
avinfo_CXXFLAGS = $(AM_CXXFLAGS) $(AVUTIL_CFLAGS) $(AVFORMAT_CFLAGS)
avinfo_LDFLAGS = $(AM_LDFLAGS) $(AVUTIL_LIBS) $(AVFORMAT_LIBS)
avinfo_LDADD = ../src/libimgcat.la
avinfo_LDADD = ../src/cat/libimgcat.la
avinfo_SOURCES = avinfo.cc

exiv_CPPFLAGS = $(AM_CPPFLAGS)
Expand Down

0 comments on commit 69736cf

Please sign in to comment.