- Modified FLAC/share/alloc.h to define SIZE_T_MAX if it isn't defined

already. For some reason, a stock install of MinGW doesn't define it, but
  if you compile your own GCC, it installs headers that do.
- Changed the way that the makefiles detect MSYS to a method that should
  be more foolproof, thanks to changes in MSYS.

SVN r737 (trunk)
This commit is contained in:
Randy Heit 2008-02-10 01:21:45 +00:00
parent 0f3a1cc8b1
commit 95180e18e6
18 changed files with 97 additions and 72 deletions

View file

@ -11,7 +11,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -33,14 +33,16 @@
#endif #endif
#include <stdlib.h> /* for size_t, malloc(), etc */ #include <stdlib.h> /* for size_t, malloc(), etc */
#ifndef SIZE_MAX #ifndef SIZE_T_MAX
# ifndef SIZE_T_MAX # ifdef _WIN64
# ifdef _MSC_VER # define SIZE_T_MAX ULLONG_MAX
# define SIZE_T_MAX UINT_MAX # elif defined(_WIN32)
# define SIZE_T_MAX UINT_MAX /* Why doesn't the standard MinGW distribution define this? */
# else # else
# error # error
# endif # endif
# endif #endif
#ifndef SIZE_MAX
# define SIZE_MAX SIZE_T_MAX # define SIZE_MAX SIZE_T_MAX
#endif #endif

View file

@ -1,7 +1,7 @@
ifeq (Windows_NT,$(OS)) ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
endif endif

View file

@ -45,7 +45,7 @@ clean:
@$(MAKE) -C zlib -f Makefile.mgw clean @$(MAKE) -C zlib -f Makefile.mgw clean
@$(MAKE) -C flac -f Makefile.mgw clean @$(MAKE) -C flac -f Makefile.mgw clean
@$(MAKE) -C jpeg-6b -f Makefile.mgw clean @$(MAKE) -C jpeg-6b -f Makefile.mgw clean
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
rm -f ccdv.exe rm -f ccdv.exe
else else
del /q /f ccdv.exe 2>nul del /q /f ccdv.exe 2>nul

View file

@ -1,10 +1,13 @@
# This makefile makes zdoom(d).exe only.
# Makefile.mgw builds this plus everything else.
# Sub-makefile autogenerated by premake # Sub-makefile autogenerated by premake
# And then tweaked by hand # And then tweaked by hand
# Where did you install the FMOD API to? Change this line so that the build process can find it. # Where did you install the FMOD API to? Change this line so that the build process can find it.
FMODDIR = "c:/program files/fmodapi375win" FMODDIR = "c:/program files/fmodapi375win"
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WINCMD=0 WINCMD=0
else else
WINCMD=1 WINCMD=1

View file

@ -1,3 +1,14 @@
February 9, 2008
- Modified FLAC/share/alloc.h to define SIZE_T_MAX if it isn't defined
already. For some reason, a stock install of MinGW doesn't define it, but
if you compile your own GCC, it installs headers that do.
- After thoroughly messing up my MinGW/MSYS installation, I deleted the whole
thing and reinstalled everything using the latest zips. Much to my surprise,
the MSYS-detection in the makefiles no longer worked because OSTYPE wasn't
being exported to process launched by the MSYS shell. I've now switched to a
different method I found through the power of Google that asks the shell
what version it is to see if the version string contains "msys".
February 8, 2008 February 8, 2008
- Applied Blzut3's sbarinfo update #11: - Applied Blzut3's sbarinfo update #11:
* SBarInfo will also accept a '|' between flags for those who are really * SBarInfo will also accept a '|' between flags for those who are really

View file

@ -33,7 +33,7 @@ $(STATICLIB): $(OBJS)
.PHONY: clean .PHONY: clean
clean: clean:
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
rm -f $(STATICLIB) rm -f $(STATICLIB)
rm -f *.o rm -f *.o
else else

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -323,7 +323,7 @@ int buildwad (FILE *listfile, char *listfilename, const char *makecmd, char *mak
{ {
fprintf (wadfile, " \\\n\t\"%s\"", filename); fprintf (wadfile, " \\\n\t\"%s\"", filename);
} }
// ARGH! Stupid make. Too bad but then these files can't be checked. // ARGH! Stupid make. Too bad, but then these files can't be checked.
// Still better than something that doesn't work at all though! // Still better than something that doesn't work at all though!
else if (!strpbrk(filename, "[]^")) else if (!strpbrk(filename, "[]^"))
{ {

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -0,0 +1,6 @@
// This resource script is for compiling with MinGW only. Visual C++
// compilations use the manifest tool to insert the manifest instead.
#include <WinUser.h>
1 RT_MANIFEST "trustinfo.txt"

View file

@ -2,7 +2,7 @@ ifeq (Windows_NT,$(OS))
WIN=1 WIN=1
WINCMD=1 WINCMD=1
endif endif
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
WIN=1 WIN=1
WINCMD=0 WINCMD=0
endif endif

View file

@ -5,12 +5,15 @@ DEHSUPP=../tools/dehsupp/dehsupp
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
include Makefile2 include Makefile2
endif endif
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
export OSTYPE=msys
endif
wadmake: zdoom.lst $(MAKEWAD).exe $(XLATCC).exe $(DEHSUPP).exe wadmake: zdoom.lst $(MAKEWAD).exe $(XLATCC).exe $(DEHSUPP).exe
$(MAKEWAD) -make wadmake zdoom.lst $(MAKEWAD) -make wadmake zdoom.lst
clean: clean:
ifeq (msys,$(OSTYPE)) ifeq ($(OSTYPE),msys)
rm -f wadmake zdoom.pk3 xlat/*.x dehsupp.lmp rm -f wadmake zdoom.pk3 xlat/*.x dehsupp.lmp
else else
del /q /f wadmake zdoom.pk3 xlat\*.x dehsupp.lmp 2>nul del /q /f wadmake zdoom.pk3 xlat\*.x dehsupp.lmp 2>nul

View file

@ -63,7 +63,7 @@ minigzip: minigzip.o $(STATICLIB)
.PHONY: clean .PHONY: clean
clean: clean:
ifeq (msys,$(OSTYPE)) ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
rm -f $(STATICLIB) rm -f $(STATICLIB)
rm -f *.o rm -f *.o
rm -f *.exe rm -f *.exe