Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools updates #180

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Re-order targets in gphoto2/Makefile.am
Use automake += operator to add source, cppflags and ldadd to gphoto2
target directly from optional features conditionals. Specifying these
files in EXTRA_DIST becomes unneeded. Add i18n.h to gphoto2_SOURCES as
it is included there and makes it redundant to specify in EXTRA_DIST.
EvaSDK committed Apr 14, 2019
commit 61835e1a2ccc4537b771ab7983aee71ff964e599
54 changes: 23 additions & 31 deletions gphoto2/Makefile.am
Original file line number Diff line number Diff line change
@@ -2,31 +2,38 @@

# We need to add the source files to the list because
# sometimes people without aalib or cdk make dist.
EXTRA_DIST = \
gphoto2-cmd-config.c gphoto2-cmd-config.h \
gphoto2-cmd-capture.c gphoto2-cmd-capture.h \
i18n.h test-hook.sh
EXTRA_DIST = test-hook.sh

bin_PROGRAMS = gphoto2

doc_DATA = test-hook.sh

if HAVE_CDK
CDK_FILES = gphoto2-cmd-config.c gphoto2-cmd-config.h
else
CDK_FILES =
endif
gphoto2_SOURCES =
gphoto2_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-D_GPHOTO2_INTERNAL_CODE
gphoto2_CFLAGS = \
-I$(top_srcdir) -I$(top_srcdir)/gphoto2 \
$(LIBGPHOTO2_CFLAGS) \
$(LIBEXIF_CFLAGS) $(RL_CFLAGS) $(POPT_CFLAGS)
gphoto2_LDADD = \
$(LIBGPHOTO2_LIBS) \
$(PTHREAD_LIBS) $(LIBEXIF_LIBS) $(INTLLIBS) $(RL_LIBS) $(POPT_LIBS)

if HAVE_AA
AA_FILES = gphoto2-cmd-capture.c gphoto2-cmd-capture.h
else
AA_FILES =
gphoto2_SOURCES += gphoto2-cmd-capture.c gphoto2-cmd-capture.h
gphoto2_CFLAGS += $(AA_CFLAGS) $(JPEG_CFLAGS)
gphoto2_LDADD += $(AA_LIBS) $(JPEG_LIBS)
endif

if HAVE_CDK
gphoto2_SOURCES += gphoto2-cmd-config.c gphoto2-cmd-config.h
gphoto2_CFLAGS += $(CDK_CFLAGS)
gphoto2_LDADD += $(CDK_LIBS)
endif

gphoto2_SOURCES = \
$(AA_FILES) \
$(CDK_FILES) \
$(NO_POPT_FILES) \
gphoto2_SOURCES += \
i18n.h \
actions.c actions.h \
foreach.c foreach.h \
globals.h \
@@ -37,21 +44,6 @@ gphoto2_SOURCES = \
range.c range.h \
shell.c shell.h

#gphoto2_LDFLAGS = -export-dynamic

gphoto2_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-D_GPHOTO2_INTERNAL_CODE

gphoto2_CFLAGS = \
-I$(top_srcdir) -I$(top_srcdir)/gphoto2 \
$(LIBGPHOTO2_CFLAGS) $(CDK_CFLAGS) $(AA_CFLAGS) \
$(LIBEXIF_CFLAGS) $(RL_CFLAGS) $(POPT_CFLAGS)

gphoto2_LDADD = \
$(LIBGPHOTO2_LIBS) $(CDK_LIBS) $(AA_LIBS) $(JPEG_LIBS) \
$(PTHREAD_LIBS) $(LIBEXIF_LIBS) $(INTLLIBS) $(RL_LIBS) $(POPT_LIBS)

TESTS = spawntest

TESTS_ENVIRONMENT = GPHOTO_HOOK=$(srcdir)/test-hook.sh