[AD] patch for makefile.vc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


the following patch allows users to specify the P4/AthlonXP architecture for compiling allegro. for msvc

specifying TARGET_ARCH_EXCL=7 is like passing -G7 (targets P4/AthlonXP arch) if the user does not pass anything, it defaults to what it currently is set to -GB (blended, which on msvc7 is PPro,P2,P3) in msvc6 is might have been older architectures (presuming P1,PPro,P2).



example (with option, specifies -G7):

C:\allegro>make TARGET_ARCH_EXCL=7
Compiling Allegro for MSVC, optimised statically linked. Please wait...
gcc -O -Wall -Werror  -o obj/msvc/runner.exe src/misc/runner.c
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_STATICLINK -DALLEGRO_SRC -W1 -Gd -O2 -MD -GL -G7 -I. -I./include -Foobj/msvc/alleg_s/allegro.obj -c src/allegro.c
allegro.c
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_STATICLINK -DALLEGRO_SRC -W1 -Gd -O2 -MD -GL -G7 -I. -I./include -Foobj/msvc/alleg_s/blit.obj -c src/blit.c
blit.c
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_STATICLINK -DALLEGRO_SRC -W1 -Gd -O2



example (without option, defautls back to -GB):

C:\allegro>make
Compiling Allegro for MSVC, optimised statically linked. Please wait...
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_STATICLINK -DALLEGRO_SRC -W1 -Gd -O2 -MD -GL -GB -I. -I./include -Foobj/msvc/alleg_s/config.obj -c src/config.c
config.c
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_STATICLINK -DALLEGRO_SRC -W1 -Gd -O2 -MD -GL -GB -I. -I./include -Foobj/msvc/alleg_s/datafile.obj -c src/datafile.c
datafile.c




here is the patch:

--- \makefile.vc	2005-02-19 06:05:00.000000000 +1100
+++ makefile.vc	2005-03-29 17:37:10.234375000 +1000
@@ -163,7 +163,7 @@

 # -------- optimised build --------

-CFLAGS = $(WFLAGS) -Gd -O2 -GB $(RUNTIME_FLAGS)
+CFLAGS = $(WFLAGS) -Gd -O2 $(RUNTIME_FLAGS)
 SFLAGS = -Wall
 LFLAGS = -release
 LIBPARMS =
@@ -174,6 +174,12 @@
    LIBPARMS += -LTCG
 endif

+ifdef TARGET_ARCH_EXCL
+	CFLAGS += -G$(TARGET_ARCH_EXCL)
+else
+	CFLAGS += -GB
+endif
+
 endif
 endif





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/