about summary refs log tree commit diff stats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-12 02:15:16 +0000
committerJames Booth <boothj5@gmail.com>2014-01-12 02:15:16 +0000
commit264fc55aa22d0069d0031a97c56afd5f86df83c3 (patch)
tree15874d0a439c8823a53bc4d298b0aae1679829c7 /Makefile.am
parent4e97c1e460d150b0cde6d8e35d8caf7bcf959a71 (diff)
downloadprofani-tty-264fc55aa22d0069d0031a97c56afd5f86df83c3.tar.gz
Added conditionals to makefile for otr support
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 17cf94dd..7b8a94c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,8 +39,7 @@ core_sources = \
 	src/tools/tinyurl.c src/tools/tinyurl.h \
 	src/config/accounts.c src/config/accounts.h \
 	src/config/preferences.c src/config/preferences.h \
-	src/config/theme.c src/config/theme.h \
-	src/otr.c src/otr.h
+	src/config/theme.c src/config/theme.h
 
 test_sources = \
 	src/contact.c src/contact.h src/common.c \
@@ -61,7 +60,6 @@ test_sources = \
 	src/config/accounts.h \
 	src/config/preferences.c src/config/preferences.h \
 	src/config/theme.c src/config/theme.h \
-	src/otr.c src/otr.h \
     tests/xmpp/mock_xmpp.h tests/xmpp/mock_xmpp.c \
     tests/ui/mock_ui.h tests/ui/mock_ui.c \
     tests/config/mock_accounts.h tests/config/mock_accounts.c \
@@ -84,6 +82,9 @@ main_source = src/main.c
 git_sources = \
     src/gitversion.c
 
+otr_sources = \
+    src/otr.c src/otr.h
+
 if INCLUDE_GIT_VERSION
 with_git_sources = $(git_sources) $(core_sources)
 tests_with_git_sources = $(git_sources) $(test_sources)
@@ -92,12 +93,20 @@ with_git_sources = $(core_sources)
 tests_with_git_sources = $(test_sources)
 endif
 
+if BUILD_OTR
+with_otr_sources = $(with_git_sources) $(otr_sources)
+tests_with_otr_sources = $(tests_with_git_sources) $(otr_sources)
+else
+with_otr_sources = $(with_git_sources)
+tests_with_otr_sources = $(tests_with_git_sources)
+endif
+
 bin_PROGRAMS = profanity
-profanity_SOURCES = $(with_git_sources) $(main_source)
+profanity_SOURCES = $(with_otr_sources) $(main_source)
 
 TESTS = tests/testsuite
 check_PROGRAMS = tests/testsuite
-tests_testsuite_SOURCES = $(tests_with_git_sources)
+tests_testsuite_SOURCES = $(tests_with_otr_sources)
 tests_testsuite_LDADD = -lcmocka
 
 man_MANS = docs/profanity.1