Re: [AD] ALLEGRO_NO_ASM broken completely on windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Milan Mimica wrote:
There is only one reasonable thing to do: Rename the lib and the DLL if
compiled without ASM. Add the _c prefix or something. Who really wants
Attached a patch. Is this all it takes?
MSVC project files have to be changed separately.
--
Milan Mimica
http://sparklet.sf.net
Index: makefile.vc
===================================================================
--- makefile.vc (revision 8189)
+++ makefile.vc (working copy)
@@ -41,6 +41,14 @@
UNIX_TOOLS = 1
endif
+# Choose the calling convenction suffix:
+ifdef ALLEGRO_USE_C
+CC_SUFFIX = _c
+else
+CC_SUFFIX =
+endif
+
+
ifdef STATICRUNTIME
# ======== USING A STATIC RUNTIME (/MT) ========
@@ -49,8 +57,8 @@
# -------- link as a static library --------
-OBJ_DIR = obj/msvc/$(VERSION)_s_crt
-IMPLIB_BASENAME = $(VERSION)_s_crt.lib
+OBJ_DIR = obj/msvc/$(VERSION)_s_crt$(CC_SUFFIX)
+IMPLIB_BASENAME = $(VERSION)_s_crt$(CC_SUFFIX).lib
IMPLIB_NAME = lib/msvc/$(IMPLIB_BASENAME)
LIB_NAME = $(IMPLIB_NAME)
@@ -58,10 +66,10 @@
# -------- link as a DLL --------
-OBJ_DIR = obj/msvc/$(VERSION)_crt
-DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION)_crt.dll
+OBJ_DIR = obj/msvc/$(VERSION)_crt$(CC_SUFFIX)
+DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION)_crt$(CC_SUFFIX).dll
DLL_NAME = lib/msvc/$(DLL_BASENAME)
-IMPLIB_BASENAME = $(VERSION)_crt.lib
+IMPLIB_BASENAME = $(VERSION)_crt$(CC_SUFFIX).lib
IMPLIB_NAME = lib/msvc/$(IMPLIB_BASENAME)
LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
@@ -79,8 +87,8 @@
# -------- link as a static library --------
-OBJ_DIR = obj/msvc/$(VERSION)_s
-IMPLIB_BASENAME = $(VERSION)_s.lib
+OBJ_DIR = obj/msvc/$(VERSION)_s$(CC_SUFFIX)
+IMPLIB_BASENAME = $(VERSION)_s$(CC_SUFFIX).lib
IMPLIB_NAME = lib/msvc/$(IMPLIB_BASENAME)
LIB_NAME = $(IMPLIB_NAME)
@@ -88,10 +96,10 @@
# -------- link as a DLL --------
-OBJ_DIR = obj/msvc/$(VERSION)
-DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION).dll
+OBJ_DIR = obj/msvc/$(VERSION)$(CC_SUFFIX)
+DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION)$(CC_SUFFIX).dll
DLL_NAME = lib/msvc/$(DLL_BASENAME)
-IMPLIB_BASENAME = $(VERSION).lib
+IMPLIB_BASENAME = $(VERSION)$(CC_SUFFIX).lib
IMPLIB_NAME = lib/msvc/$(IMPLIB_BASENAME)
LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
Index: makefile.mgw
===================================================================
--- makefile.mgw (revision 8189)
+++ makefile.mgw (working copy)
@@ -35,14 +35,19 @@
UNIX_TOOLS = 1
endif
+ifdef ALLEGRO_USE_C
+ CC_SUFFIX = _c
+else
+ CC_SUFFIX =
+endif
ifdef STATICLINK
# -------- link as a static library --------
-OBJ_DIR = obj/mingw32/$(VERSION)_s
-IMPLIB_BASENAME = lib$(VERSION)_s.a
+OBJ_DIR = obj/mingw32/$(VERSION)_s$(CC_SUFFIX)
+IMPLIB_BASENAME = lib$(VERSION)_s$(CC_SUFFIX).a
IMPLIB_NAME = lib/mingw32/$(IMPLIB_BASENAME)
LIB_NAME = $(IMPLIB_NAME)
@@ -50,10 +55,10 @@
# -------- link as a DLL --------
-OBJ_DIR = obj/mingw32/$(VERSION)
-DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION).dll
+OBJ_DIR = obj/mingw32/$(VERSION)$(CC_SUFFIX)
+DLL_BASENAME = $(VERSION)$(LIBRARY_VERSION)$(CC_SUFFIX).dll
DLL_NAME = lib/mingw32/$(DLL_BASENAME)
-IMPLIB_BASENAME = lib$(VERSION).a
+IMPLIB_BASENAME = lib$(VERSION)$(CC_SUFFIX).a
IMPLIB_NAME = lib/mingw32/$(IMPLIB_BASENAME)
LIB_NAME = $(DLL_NAME) $(IMPLIB_NAME)
EXPDEF_NAME = lib/mingw32/allegro.def
Index: makefile.all
===================================================================
--- makefile.all (revision 8189)
+++ makefile.all (working copy)
@@ -15,7 +15,7 @@
# to *NOT* be backwards compatible (GCC-based platforms, MSVC).
# TARGET_OPTS allows you to customize general optimizations (GCC-based platforms).
# CROSSCOMPILE=1 cross-build under Linux (DJGPP, MinGW32).
-# ALLEGRO_USE_C=1 use C drawing code instead of asm (GCC-based platforms).
+# ALLEGRO_USE_C=1 use C drawing code instead of asm (GCC-based platforms, MSVC).
# UNIX_TOOLS=1 use Unix-like tools instead of DOS tools.
#
# Targets: