minor os/2 reorganization for iconv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/Makefile.os2 b/Makefile.os2
index 86753e6..07ca845 100644
--- a/Makefile.os2
+++ b/Makefile.os2
@@ -12,11 +12,9 @@ LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
-INCPATH+= -I"src/core/os2" -I"src/core/os2/geniconv"
LIBM = libm.lib
-LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
-
+LIBS = mmpm2.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
CFLAGS+= -wx
@@ -24,6 +22,8 @@ CFLAGS+= -wx
CFLAGS+= -wcd=303
# building dll:
CFLAGS+= -bd
+# iconv:
+LIBS+= libuls.lib libconv.lib
# the include paths :
CFLAGS+= $(INCPATH)
# building SDL itself (for DECLSPEC):
@@ -68,7 +68,8 @@ SRCS+= SDL_dummysensor.c
SRCS+= SDL_locale.c SDL_syslocale.c
SRCS+= SDL_url.c SDL_sysurl.c
-SRCS+= SDL_os2.c geniconv.c os2cp.c os2iconv.c sys2utf8.c
+SRCS+= SDL_os2.c
+SRCS+= geniconv.c os2cp.c os2iconv.c sys2utf8.c
SRCS+= SDL_os2audio.c
SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
SDL_os2mouse.c SDL_os2messagebox.c
@@ -83,7 +84,8 @@ MOBJS= $(MSRCS:.c=.obj)
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
-.c: ./src/core/os2;./src/core/os2/geniconv;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
+.c: ./src/core/os2;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
+.c: ./src/core/os2/geniconv;
.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy;./src/joystick/hidapi;./src/hidapi
all: $(DLLFILE) $(LIBFILE) .symbolic
diff --git a/src/core/os2/SDL_os2.c b/src/core/os2/SDL_os2.c
index 737d9cd..fbba3d5 100644
--- a/src/core/os2/SDL_os2.c
+++ b/src/core/os2/SDL_os2.c
@@ -23,7 +23,7 @@
#if defined(__OS2__)
-#include "geniconv/geniconv.h"
+#include "SDL_os2.h"
/* SDL_OS2Quit() will be called from SDL_QuitSubSystem() */
void SDL_OS2Quit(void)
diff --git a/src/core/os2/SDL_os2.h b/src/core/os2/SDL_os2.h
index 0f2091b..efc1bc1 100644
--- a/src/core/os2/SDL_os2.h
+++ b/src/core/os2/SDL_os2.h
@@ -23,7 +23,6 @@
#include "SDL_log.h"
#include "SDL_stdinc.h"
-#include "geniconv/geniconv.h"
#ifdef OS2DEBUG
#if (OS2DEBUG-0 >= 2)
@@ -39,8 +38,8 @@
#endif /* OS2DEBUG */
-
/* StrUTF8New() - geniconv/sys2utf8.c */
+#include "geniconv/geniconv.h"
#define OS2_SysToUTF8(S) StrUTF8New(1, (S), SDL_strlen((S)) + 1)
#define OS2_UTF8ToSys(S) StrUTF8New(0, (char *)(S), SDL_strlen((S)) + 1)
diff --git a/src/core/os2/geniconv/geniconv.h b/src/core/os2/geniconv/geniconv.h
index ae8a8b2..377a1e6 100644
--- a/src/core/os2/geniconv/geniconv.h
+++ b/src/core/os2/geniconv/geniconv.h
@@ -28,7 +28,7 @@
#ifndef GENICONV_H
#define GENICONV_H
-#include <iconv.h>
+#include "iconv.h"
#ifdef iconv_open
#undef iconv_open