Upgraded ccdv-win32.c and the Makefiles so that they are fully functional under MSYS.
SVN r286 (trunk)
This commit is contained in:
parent
b8312a9bd8
commit
55e299e4b3
14 changed files with 330 additions and 118 deletions
|
|
@ -1,13 +1,21 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
ifeq (1,$(WIN))
|
||||
EXE = dehsupp.exe
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
else
|
||||
EXE = dehsupp
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
CC = gcc
|
||||
LDFLAGS = -s
|
||||
|
||||
|
|
@ -26,7 +34,7 @@ $(EXE): $(OBJS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
ifeq (1,$(WIN))
|
||||
EXE = lemon.exe
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = $(LOC) -D_WIN32 -Os -Wall -Wno-implicit -fomit-frame-pointer
|
||||
else
|
||||
EXE = lemon
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Os -Wall -Wno-implicit -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
CC = gcc
|
||||
LDFLAGS = -s
|
||||
|
||||
|
|
@ -24,7 +32,7 @@ $(EXE): $(OBJS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,17 +1,25 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
ifeq (1,$(WIN))
|
||||
EXE = makewad.exe
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Os -Wall -fomit-frame-pointer
|
||||
LDFLAGS = -s -L../../zlib/ -lz
|
||||
ZLIB = ../../zlib/libz.a
|
||||
else
|
||||
EXE = makewad
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||
LDFLAGS = -s -lz
|
||||
ZLIB =
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
CC = gcc
|
||||
|
||||
OBJS = makewad.o ioapi.o zip.o
|
||||
|
|
@ -24,7 +32,7 @@ all: $(EXE)
|
|||
$(EXE): $(OBJS) $(ZLIB)
|
||||
$(CCDV) $(CC) -o $(EXE) $(OBJS) $(LDFLAGS)
|
||||
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WIN))
|
||||
$(ZLIB):
|
||||
make -C ../../zlib -f Makefile.mgw
|
||||
endif
|
||||
|
|
@ -32,7 +40,7 @@ endif
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ int appendtozip (zipFile zipfile, const char * zipname, const char *filename)
|
|||
// - otherwise, we're writing lumps into a wad/zip
|
||||
//
|
||||
*/
|
||||
int buildwad (FILE *listfile, char *listfilename, char *makecmd, char *makefile)
|
||||
int buildwad (FILE *listfile, char *listfilename, const char *makecmd, char *makefile)
|
||||
{
|
||||
// destination we're writing output into -
|
||||
// one of these:
|
||||
|
|
@ -442,6 +442,7 @@ int buildwad (FILE *listfile, char *listfilename, char *makecmd, char *makefile)
|
|||
|
||||
int __cdecl main (int argc, char **argv)
|
||||
{
|
||||
const char *makecmd;
|
||||
FILE *listfile = NULL;
|
||||
char *listfilename = NULL;
|
||||
char *makefile = NULL;
|
||||
|
|
@ -480,7 +481,16 @@ int __cdecl main (int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
ret = buildwad (listfile ? listfile : stdin, listfilename, argv[0], makefile);
|
||||
// Hack for msys
|
||||
if ((makecmd = getenv("OSTYPE")) != NULL && strcmp (makecmd, "msys") == 0)
|
||||
{
|
||||
makecmd = "../tools/makewad/makewad.exe";
|
||||
}
|
||||
else
|
||||
{
|
||||
makecmd = argv[0];
|
||||
}
|
||||
ret = buildwad (listfile ? listfile : stdin, listfilename, makecmd, makefile);
|
||||
if (listfile != NULL)
|
||||
{
|
||||
fclose (listfile);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
ifeq (1,$(WIN))
|
||||
EXE = re2c.exe
|
||||
CCDV = @../../ccdv
|
||||
CXXFLAGS = $(LOC) -D_WIN32 -DNDEBUG -Os -Wall -Wno-unused
|
||||
else
|
||||
EXE = re2c
|
||||
CCDV = @../../ccdv
|
||||
CXXFLAGS = -DHAVE_CONFIG_H -DNDEBUG -Os -Wall -Wno-unused
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
CXX = g++
|
||||
LDFLAGS= -s
|
||||
|
||||
|
|
@ -24,7 +32,7 @@ $(EXE): $(OBJS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,16 +1,24 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Os -Wall -fomit-frame-pointer
|
||||
LDFLAGS = -s
|
||||
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WIN))
|
||||
EXE = updaterevision.exe
|
||||
CCDV = @../../ccdv
|
||||
else
|
||||
EXE = updaterevision
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Os -Wall -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
|
||||
OBJS = updaterevision.o
|
||||
|
||||
all: $(EXE)
|
||||
|
|
@ -21,7 +29,7 @@ $(EXE): $(OBJS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (Windows_NT,$(OS))
|
||||
WIN=1
|
||||
WINCMD=1
|
||||
endif
|
||||
ifeq (msys,$(OSTYPE))
|
||||
WIN=1
|
||||
WINCMD=0
|
||||
endif
|
||||
|
||||
ifeq (1,$(WIN))
|
||||
EXE = xlatcc.exe
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
else
|
||||
EXE = xlatcc
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CCDV = @../../ccdv
|
||||
CC = gcc
|
||||
LDFLAGS= -s
|
||||
|
||||
|
|
@ -24,7 +32,7 @@ $(EXE): $(OBJS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
ifeq (Windows_NT,$(OS))
|
||||
ifeq (1,$(WINCMD))
|
||||
-del /q /f $(EXE) 2>nul
|
||||
-del /q /f *.o 2>nul
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue