summaryrefslogtreecommitdiffstats
path: root/osdep/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/Makefile')
-rw-r--r--osdep/Makefile23
1 files changed, 13 insertions, 10 deletions
diff --git a/osdep/Makefile b/osdep/Makefile
index 0040ffd4ad..9865581623 100644
--- a/osdep/Makefile
+++ b/osdep/Makefile
@@ -3,18 +3,21 @@ include ../config.mak
LIBNAME = libosdep.a
-SRCS= shmem.c \
- strsep.c \
- strl.c \
- vsscanf.c \
- scandir.c \
- gettimeofday.c \
+SRCS= strl.c \
fseeko.c \
- swab.c \
- setenv.c \
- mmap_anon.c \
+SRCS-$(HAVE_SYS_MMAN_H) += mmap_anon.c
SRCS-$(MACOSX_FINDER_SUPPORT) += macosx_finder_args.c
+ifneq ($(TARGET_OS),MINGW32)
+SRCS-$(STREAM_CACHE) += shmem.c
+endif
+
+SRCS-$(NEED_GETTIMEOFDAY) += gettimeofday.c
+SRCS-$(NEED_SCANDIR) += scandir.c
+SRCS-$(NEED_SETENV) += setenv.c
+SRCS-$(NEED_STRSEP) += strsep.c
+SRCS-$(NEED_SWAB) += swab.c
+SRCS-$(NEED_VSSCANF) += vsscanf.c
getch = getch2.c
timer = timer-lx.c
@@ -26,7 +29,7 @@ timer = timer-darwin.c
endif
ifeq ($(TARGET_OS),MINGW32)
getch = getch2-win.c
-SRCS += glob-win.c
+SRCS-$(NEED_GLOB) += glob-win.c
endif
SRCS += $(timer)
SRCS += $(getch)