ifeq ($(CDROM_SUPPORT),1)
CDROM_SO=cdrom$(LIB_SUFFIX)
cdrom_so=cdrom.o
endif

pfilesel_so=\
adbmeta.o                     \
charsets.o                    \
cphlpfs.o                     \
dirdb.o                       \
download.o                    \
filesystem.o                  \
filesystem-ancient.o          \
filesystem-bzip2.o            \
filesystem-dir-mem.o          \
filesystem-drive.o            \
filesystem-file-dev.o         \
filesystem-file-mem.o         \
filesystem-filehandle-cache.o \
filesystem-gzip.o             \
filesystem-pak.o              \
filesystem-playlist.o         \
filesystem-playlist-m3u.o     \
filesystem-playlist-pls.o     \
filesystem-setup.o            \
filesystem-rpg.o              \
filesystem-tar.o              \
filesystem-textfile.o         \
filesystem-z.o                \
filesystem-zip.o              \
fsptype.o                     \
mdb.o                         \
modlist.o                     \
musicbrainz.o                 \
pfilesel.o                    \
pfsmain.o

ifeq ($(WINDOWS),1)
pfilesel_so += filesystem-windows.o
else
pfilesel_so += filesystem-unix.o
endif

ifeq ($(STATIC_CORE),1)
 STATIC_OBJECTS += $(patsubst %.o,filesel/%.o,$(cdrom_so))
 STATIC_OBJECTS += $(patsubst %.o,filesel/%.o,$(pfilesel_so))
 STATIC_LIBS += -lz -lbz2 $(MATH_LIBS) $(PTHREAD_LIBS) $(LIBDISCID_LIBS) $(ICONV_LIBS) $(LIBCJSON_LIBS) $(LIBANCIENT_LIBS)
 ifeq ($(WINDOWS),1)
  STATIC_LIBS += -lshlwapi # due to PathMatchSpec()
 endif
endif
