summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-28 22:49:10 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-28 22:49:10 +0300
commitdb31c2f832dd4067e4670dd469fe3b696188576b (patch)
tree7ed857adddd833cfd5087ee6c22e408637301c5c /src/Makefile.am
parent6583c1a039a28a41a865b02598e6da9521046325 (diff)
downloadplus-db31c2f832dd4067e4670dd469fe3b696188576b.tar.gz
plus-db31c2f832dd4067e4670dd469fe3b696188576b.tar.bz2
plus-db31c2f832dd4067e4670dd469fe3b696188576b.tar.xz
plus-db31c2f832dd4067e4670dd469fe3b696188576b.zip
Add configure flag for use physfs.
New configure option: --without-physfs For now manaplus cant be compiled without physfs.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am56
1 files changed, 39 insertions, 17 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 57b264163..71d5c3c87 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -76,6 +76,11 @@ dyecmd_CXXFLAGS += -DUSE_OPENGL
manaplus_CXXFLAGS += -DUSE_OPENGL
endif
+if USE_PHYSFS
+dyecmd_CXXFLAGS += -DUSE_PHYSFS
+manaplus_CXXFLAGS += -DUSE_PHYSFS
+endif
+
if ENABLE_MEM_DEBUG
dyecmd_CXXFLAGS += -DENABLE_MEM_DEBUG -DDEBUG_DUMP_LEAKS
manaplus_CXXFLAGS += -DENABLE_MEM_DEBUG -DDEBUG_DUMP_LEAKS
@@ -551,27 +556,15 @@ BASE_SRC += events/actionevent.h \
utils/perfomance.cpp \
utils/perfomance.h \
utils/debugmemoryobject.h \
- fs/virtfsdir.cpp \
- fs/virtfsdir.h \
fs/virtfsfuncs.h \
- fs/virtfsphys.cpp \
- fs/virtfsphys.h \
fs/virtfsrwops.cpp \
fs/virtfsrwops.h \
fs/virtfstools.cpp \
fs/virtfstools.h \
- fs/virtfszip.cpp \
- fs/virtfszip.h \
fs/virtlist.cpp \
fs/virtlist.h \
- fs/virtzipentry.cpp \
- fs/virtzipentry.h \
fs/virtfs.cpp \
fs/virtfs.h \
- fs/zip.cpp \
- fs/zip.h \
- fs/ziplocalheader.cpp \
- fs/ziplocalheader.h \
utils/process.cpp \
utils/process.h \
utils/sdl2helper.cpp \
@@ -835,6 +828,24 @@ BASE_SRC += events/actionevent.h \
resources/memorymanager.h \
winver.h
+if USE_PHYSFS
+BASE_SRC += \
+ fs/virtfsphys.cpp \
+ fs/virtfsphys.h
+else
+BASE_SRC += \
+ fs/virtfsdir.cpp \
+ fs/virtfsdir.h \
+ fs/virtfszip.cpp \
+ fs/virtfszip.h \
+ fs/virtzipentry.cpp \
+ fs/virtzipentry.h \
+ fs/zip.cpp \
+ fs/zip.h \
+ fs/ziplocalheader.cpp \
+ fs/ziplocalheader.h
+endif
+
if ENABLE_PUGIXML
BASE_SRC += utils/xml/pugixml.cpp \
utils/xml/pugixml.h \
@@ -1909,6 +1920,9 @@ TESTS = manaplustests
check_PROGRAMS = manaplustests
manaplustests_CXXFLAGS = ${manaplus_CXXFLAGS} \
-DUNITTESTS
+if USE_PHYSFS
+manaplustests_CXXFLAGS += -DUSE_PHYSFS
+endif
if USE_SDL2
manaplustests_CXXFLAGS += -DUSE_SDL2
endif
@@ -1933,12 +1947,20 @@ manaplustests_SOURCES = ${SRC} \
render/mockgraphics.h \
enums/enums_unittest.cc \
utils/dumplibs_unittest.cc \
- utils/checkutils_unittest.cc \
- fs/virtfs_unittest.cc \
- fs/virtfsphys_unittest.cc \
- fs/zip_unittest.cc \
+ utils/checkutils_unittest.cc
+
+if USE_PHYSFS
+manaplustests_SOURCES += \
+ fs/virtfsphys_unittest.cc
+else
+manaplustests_SOURCES += \
fs/virtfsdir_unittest.cc \
- fs/virtfszip_unittest.cc \
+ fs/zip_unittest.cc \
+ fs/virtfszip_unittest.cc
+endif
+
+manaplustests_SOURCES += \
+ fs/virtfs_unittest.cc \
utils/xml_unittest.cc \
utils/timer_unittest.cc \
utils/xmlutils_unittest.cc \