mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Added Linux support for the CMakeLists. This meant downgrading them for
CMake 2.4, since the distros don't seem to consider 2.6 stable yet. As a bonus, GTK+ is no longer a required dependency; now it's optional. - Made dehsupp ignore CR characters, so it doesn't spew warnings on Linux. SVN r1092 (trunk)
This commit is contained in:
parent
0e9c1d0c2a
commit
de5d4715c2
24 changed files with 106 additions and 248 deletions
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
|
|
||||||
set( ZDOOM_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created" )
|
set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created" )
|
||||||
set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create" )
|
set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create" )
|
||||||
|
|
||||||
find_package( JPEG )
|
find_package( JPEG )
|
||||||
|
|
188
Makefile.linux
188
Makefile.linux
|
@ -1,188 +0,0 @@
|
||||||
# created on 4/12/2006 by James Bentler
|
|
||||||
|
|
||||||
FMOD_PREFIX = /usr/local
|
|
||||||
CXX ?= g++
|
|
||||||
CC ?= gcc
|
|
||||||
NASM ?= nasm
|
|
||||||
CCDV = @./ccdv
|
|
||||||
|
|
||||||
# Can be libdumbd.a, if you really need to debug DUMB
|
|
||||||
DUMBLIB ?= libdumbd.a
|
|
||||||
|
|
||||||
ifndef X64
|
|
||||||
ifeq (x86_64,$(shell uname -m))
|
|
||||||
X64=64
|
|
||||||
else
|
|
||||||
X64=
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef DEBUG
|
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused -fno-strict-aliasing
|
|
||||||
else
|
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused -fno-strict-aliasing -O2 -fomit-frame-pointer
|
|
||||||
CXXFLAGS ?= -fno-rtti
|
|
||||||
endif
|
|
||||||
#ifdef GC
|
|
||||||
# CFLAGS += -ffunction-sections
|
|
||||||
# LDFLAGS += -Wl,--gc-sections
|
|
||||||
#endif
|
|
||||||
CFLAGS += -MMD -DHAVE_FILELENGTH -D__forceinline=inline `sdl-config --cflags` `pkg-config gtk+-2.0 --cflags`
|
|
||||||
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
|
|
||||||
LDFLAGS += -lz -ljpeg `sdl-config --libs` `pkg-config gtk+-2.0 --libs` $(FMOD_PREFIX)/lib/libfmodex${X64}.so
|
|
||||||
NASMFLAGS += -f elf -DM_TARGET_LINUX
|
|
||||||
|
|
||||||
ifdef VALGRIND
|
|
||||||
NOSTRIP = 1
|
|
||||||
NASMFLAGS += -DVALGRIND_AWARE
|
|
||||||
endif
|
|
||||||
|
|
||||||
SRCDIRS = src/ $(addprefix src/,g_doom/ g_heretic/ g_hexen/ g_raven/ g_shared/ g_strife/ oplsynth/ sound/ sdl/ textures/ thingdef/ xlat/ timidity/)
|
|
||||||
VPATH = $(SRCDIRS)
|
|
||||||
INCLUDES = $(addprefix -I,$(SRCDIRS))
|
|
||||||
INCLUDES += -Isnes_spc/snes_spc/ -I$(FMOD_PREFIX)/include/fmodex/
|
|
||||||
CFLAGS += $(INCLUDES)
|
|
||||||
|
|
||||||
RELEASEOBJ ?= releaseobj
|
|
||||||
DEBUGOBJ ?= debugobj
|
|
||||||
|
|
||||||
CPPSRCS = $(wildcard $(addsuffix *.cpp,$(SRCDIRS)))
|
|
||||||
CSRCS = $(filter-out src/xlat/xlat_parser.c, $(wildcard $(addsuffix *.c,$(SRCDIRS))))
|
|
||||||
ifdef X64
|
|
||||||
NOASM=1
|
|
||||||
endif
|
|
||||||
ifdef NOASM
|
|
||||||
CFLAGS += -DNOASM
|
|
||||||
else
|
|
||||||
ASRCS = $(wildcard src/*.nas)
|
|
||||||
CFLAGS += -DUSEASM=1
|
|
||||||
endif
|
|
||||||
SRCS = $(CSRCS) $(CPPSRCS) $(ASRCS)
|
|
||||||
CPPOBJFILES = $(notdir $(patsubst %.cpp,%.o,$(CPPSRCS)))
|
|
||||||
COBJFILES = $(notdir $(patsubst %.c,%.o,$(CSRCS)))
|
|
||||||
AOBJFILES = $(notdir $(patsubst %.nas,%.o,$(ASRCS)))
|
|
||||||
|
|
||||||
ZDOOM = zdoom
|
|
||||||
ZDOOMDEBUG = zdoomd
|
|
||||||
|
|
||||||
ifdef DEBUG
|
|
||||||
OBJDIR = $(DEBUGOBJ)
|
|
||||||
CFLAGS += -D_DEBUG -g3
|
|
||||||
NASMFLAGS += -g
|
|
||||||
ZDOOMBIN = $(ZDOOMDEBUG)
|
|
||||||
else
|
|
||||||
OBJDIR = $(RELEASEOBJ)
|
|
||||||
CFLAGS += -DNDEBUG
|
|
||||||
LDFLAGS += -Wl,-Map=$(ZDOOM).map
|
|
||||||
ifndef NOSTRIP
|
|
||||||
LDFLAGS += -s
|
|
||||||
else
|
|
||||||
CFLAGS += -g
|
|
||||||
endif
|
|
||||||
ZDOOMBIN = $(ZDOOM)
|
|
||||||
endif
|
|
||||||
CXXFLAGS += $(CFLAGS)
|
|
||||||
|
|
||||||
COBJS = $(addprefix $(OBJDIR)/,$(CPPOBJFILES) $(COBJFILES))
|
|
||||||
DEPS = $(patsubst %.o,%.d,$(COBJS))
|
|
||||||
OBJS = $(addprefix $(OBJDIR)/,$(AOBJFILES)) $(COBJS)
|
|
||||||
|
|
||||||
all: $(ZDOOMBIN) toolsandpk3 zdoom.pk3
|
|
||||||
|
|
||||||
$(ZDOOMBIN): ccdv updaterev src/xlat/xlat_parser.h src/xlat/xlat_parser.c $(OBJDIR) $(OBJS) snes_spc/libsnes_spc.a dumb/lib/$(DUMBLIB)
|
|
||||||
$(CCDV) $(CXX) $(LDFLAGS) $(OBJDIR)/autostart.o \
|
|
||||||
$(filter-out %/autostart.o %/autozend.o,$(OBJS)) \
|
|
||||||
snes_spc/libsnes_spc.a dumb/lib/$(DUMBLIB) $(OBJDIR)/autozend.o -o $(ZDOOMBIN)
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.cpp
|
|
||||||
$(CCDV) $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.c
|
|
||||||
$(CCDV) $(CC) $(CFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.nas
|
|
||||||
$(CCDV) $(NASM) -o $@ $(NASMFLAGS) $<
|
|
||||||
|
|
||||||
# This file needs special handling so that it actually gets compiled with SSE2 support.
|
|
||||||
$(OBJDIR)/nodebuild_classify_sse2.o: nodebuild_classify_sse2.cpp
|
|
||||||
$(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $<
|
|
||||||
|
|
||||||
# This file needs special handling because GCC misoptimizes it otherwise.
|
|
||||||
$(OBJDIR)/fmopl.o: src/oplsynth/fmopl.cpp
|
|
||||||
$(CCDV) $(CXX) $(CXXFLAGS) -fno-tree-dominator-opts -fno-tree-fre -c -o $@ $<
|
|
||||||
|
|
||||||
src/xlat/xlat_parser.h src/xlat/xlat_parser.c: tools/lemon/lemon src/xlat/xlat_parser.y
|
|
||||||
$(CCDV) tools/lemon/lemon -s src/xlat/xlat_parser.y
|
|
||||||
|
|
||||||
$(OBJDIR):
|
|
||||||
mkdir $(OBJDIR)
|
|
||||||
|
|
||||||
toolsandpk3: ccdv tools/makewad/makewad tools/dehsupp/dehsupp tools/lemon/lemon
|
|
||||||
$(MAKE) -C wadsrc/
|
|
||||||
|
|
||||||
zdoom.pk3: toolsandpk3
|
|
||||||
ln -sf wadsrc/zdoom.pk3 ./
|
|
||||||
|
|
||||||
snes_spc/libsnes_spc.a: ccdv
|
|
||||||
$(MAKE) -C snes_spc/
|
|
||||||
|
|
||||||
dumb/lib/libdumb.a: ccdv
|
|
||||||
$(MAKE) -C dumb/
|
|
||||||
|
|
||||||
dumb/lib/libdumbd.a: ccdv
|
|
||||||
$(MAKE) CONFIG=Debug -C dumb/
|
|
||||||
|
|
||||||
tools/makewad/makewad: ccdv
|
|
||||||
$(MAKE) -C tools/makewad/
|
|
||||||
|
|
||||||
tools/dehsupp/dehsupp: ccdv
|
|
||||||
$(MAKE) -C tools/dehsupp/
|
|
||||||
|
|
||||||
tools/lemon/lemon: ccdv
|
|
||||||
$(MAKE) -C tools/lemon/
|
|
||||||
|
|
||||||
updaterev: tools/updaterevision/updaterevision
|
|
||||||
@tools/updaterevision/updaterevision . src/svnrevision.h
|
|
||||||
|
|
||||||
tools/updaterevision/updaterevision: ccdv
|
|
||||||
$(MAKE) -C tools/updaterevision
|
|
||||||
|
|
||||||
.PHONY : clean cleandeps cleanobjs distclean toolsandpk3 cleantools updaterev
|
|
||||||
|
|
||||||
clean: cleanobjs
|
|
||||||
rm -f $(ZDOOMDEBUG) $(ZDOOM) $(ZDOOM).map
|
|
||||||
rm -f ccdv
|
|
||||||
@$(MAKE) -C snes_spc clean
|
|
||||||
|
|
||||||
cleantools:
|
|
||||||
@$(MAKE) -C wadsrc clean
|
|
||||||
@$(MAKE) -C tools/makewad clean
|
|
||||||
@$(MAKE) -C tools/dehsupp clean
|
|
||||||
@$(MAKE) -C tools/updaterevision clean
|
|
||||||
@$(MAKE) -C tools/lemon clean
|
|
||||||
|
|
||||||
cleandebug:
|
|
||||||
rm -f $(ZDOOMDEBUG) $(DEBUGOBJ)/*.o $(DEBUGOBJ)/*.d
|
|
||||||
-rmdir $(DEBUGOBJ)
|
|
||||||
|
|
||||||
cleanrelease:
|
|
||||||
rm -f $(ZDOOM) $(ZDOOM).map $(RELEASEOBJ)/*.o $(RELEASEOBJ)/*.o
|
|
||||||
-rmdir $(RELEASEOBJ)
|
|
||||||
|
|
||||||
# I could use a recursive delete instead, but that could be dangerous...
|
|
||||||
distclean: clean cleandeps
|
|
||||||
-rmdir $(RELEASEOBJ) $(DEBUGOBJ)
|
|
||||||
rm -f zdoom.pk3
|
|
||||||
|
|
||||||
cleandeps:
|
|
||||||
rm -f $(RELEASEOBJ)/*.d $(DEBUGOBJ)/*.d
|
|
||||||
|
|
||||||
cleanobjs:
|
|
||||||
rm -f $(RELEASEOBJ)/*.o $(DEBUGOBJ)/*.o
|
|
||||||
|
|
||||||
ccdv: ccdv-posix.c
|
|
||||||
@gcc -Os -s ccdv-posix.c -o ccdv
|
|
||||||
|
|
||||||
ifeq (,$(findstring $(MAKECMDGOALS),clean cleandeps cleanobjs distclean toolsandpk3 cleantools updaterev))
|
|
||||||
-include $(DEPS)
|
|
||||||
endif
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
July 24, 2008
|
||||||
|
- Added Linux support for the CMakeLists. This meant downgrading them for
|
||||||
|
CMake 2.4, since the distros don't seem to consider 2.6 stable yet.
|
||||||
|
As a bonus, GTK+ is no longer a required dependency; now it's optional.
|
||||||
|
- Made dehsupp ignore CR characters, so it doesn't spew warnings on Linux.
|
||||||
|
|
||||||
July 23, 2008 (Changes by Graf Zahl)
|
July 23, 2008 (Changes by Graf Zahl)
|
||||||
- Fixed: The sounds of Strife's intro need CHAN_UI.
|
- Fixed: The sounds of Strife's intro need CHAN_UI.
|
||||||
- Changed all instances of playing the chat sounds to use CHAN_UI.
|
- Changed all instances of playing the chat sounds to use CHAN_UI.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( dumb )
|
|
||||||
|
|
||||||
# DUMB is much slower in a Debug build than a Release build, so we force a Release
|
# DUMB is much slower in a Debug build than a Release build, so we force a Release
|
||||||
# build here, since we're not maintaining DUMB, only using it.
|
# build here, since we're not maintaining DUMB, only using it.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( gdtoa )
|
|
||||||
|
|
||||||
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
||||||
|
|
||||||
|
@ -15,12 +14,12 @@ add_definitions( -DINFNAN_CHECK -DMULTIPLE_THREADS )
|
||||||
if( NOT MSVC )
|
if( NOT MSVC )
|
||||||
add_executable( arithchk arithchk.c )
|
add_executable( arithchk arithchk.c )
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
||||||
COMMAND arithchk >${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/arithchk >${CMAKE_CURRENT_BINARY_DIR}/arith.h
|
||||||
DEPENDS arithchk )
|
DEPENDS arithchk )
|
||||||
|
|
||||||
add_executable( qnan qnan.c arith.h )
|
add_executable( qnan qnan.c arith.h )
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
||||||
COMMAND qnan >${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/qnan >${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
|
||||||
DEPENDS qnan )
|
DEPENDS qnan )
|
||||||
|
|
||||||
set( GEN_FP_FILES arith.h gd_qnan.h )
|
set( GEN_FP_FILES arith.h gd_qnan.h )
|
||||||
|
|
|
@ -284,7 +284,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
|
#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
|
||||||
Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
|
#error Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef union { double d; ULong L[2]; } U;
|
typedef union { double d; ULong L[2]; } U;
|
||||||
|
|
16
gdtoa/misc.c
16
gdtoa/misc.c
|
@ -896,5 +896,21 @@ void FREE_DTOA_LOCK(int n)
|
||||||
LeaveCriticalSection(&dtoa_lock[n]);
|
LeaveCriticalSection(&dtoa_lock[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
static pthread_mutex_t dtoa_lock[2] = { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
|
||||||
|
|
||||||
|
void ACQUIRE_DTOA_LOCK(int n)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&dtoa_lock[n]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FREE_DTOA_LOCK(int n)
|
||||||
|
{
|
||||||
|
pthread_mutex_unlock(&dtoa_lock[n]);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -85,7 +85,7 @@ strtod
|
||||||
int rounding;
|
int rounding;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_control87(_PC_53, _MCW_PC);
|
//_control87(_PC_53, _MCW_PC);
|
||||||
sign = nz0 = nz = decpt = 0;
|
sign = nz0 = nz = decpt = 0;
|
||||||
dval(rv) = 0.;
|
dval(rv) = 0.;
|
||||||
for(s = s00;;s++) switch(*s) {
|
for(s = s00;;s++) switch(*s) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( jpeg )
|
|
||||||
|
|
||||||
if( CMAKE_COMPILER_IS_GNUC )
|
if( CMAKE_COMPILER_IS_GNUC )
|
||||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" )
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( snes_spc )
|
include( CheckCXXCompilerFlag )
|
||||||
|
|
||||||
# I don't plan on debugging this, so make it a release build.
|
# I don't plan on debugging this, so make it a release build.
|
||||||
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||||
|
|
||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fomit-frame-pointer" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fomit-frame-pointer -Wno-array-bounds" )
|
||||||
|
check_cxx_compiler_flag( -Wno-array-bounds HAVE_NO_ARRAY_BOUNDS )
|
||||||
|
if( HAVE_NO_ARRAY_BOUNDS )
|
||||||
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds" )
|
||||||
|
endif( HAVE_NO_ARRAY_BOUNDS )
|
||||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
||||||
add_library( snes_spc
|
add_library( snes_spc
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
include( CheckFunctionExists )
|
include( CheckFunctionExists )
|
||||||
|
include( FindPkgConfig )
|
||||||
|
|
||||||
option( NO_ASM "Disable assembly code" )
|
option( NO_ASM "Disable assembly code" )
|
||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
@ -85,6 +86,7 @@ else( WIN32 )
|
||||||
/usr/include
|
/usr/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
/opt/include )
|
/opt/include )
|
||||||
|
set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES fmodex )
|
||||||
set( NASM_NAMES nasm )
|
set( NASM_NAMES nasm )
|
||||||
|
|
||||||
# Non-Windows version also needs SDL
|
# Non-Windows version also needs SDL
|
||||||
|
@ -97,13 +99,13 @@ else( WIN32 )
|
||||||
|
|
||||||
# Use GTK+ for the IWAD picker, if available.
|
# Use GTK+ for the IWAD picker, if available.
|
||||||
if( NOT NO_GTK )
|
if( NOT NO_GTK )
|
||||||
find_package( GTK )
|
pkg_check_modules( GTK2 gtk+-2.0 )
|
||||||
if( GTK_FOUND )
|
if( GTK2_FOUND )
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} ${GTK_LIBRARIES )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} ${GTK2_LIBRARIES} )
|
||||||
include_directories( "${GTK_LIBRARIES}" )
|
include_directories( ${GTK2_INCLUDE_DIRS} )
|
||||||
else( GTK_FOUND )
|
else( GTK2_FOUND )
|
||||||
set( NO_GTK ON )
|
set( NO_GTK ON )
|
||||||
endif( GTK_FOUND )
|
endif( GTK2_FOUND )
|
||||||
endif( NOT NO_GTK )
|
endif( NOT NO_GTK )
|
||||||
|
|
||||||
if( NO_GTK )
|
if( NO_GTK )
|
||||||
|
@ -255,7 +257,7 @@ endif( NOT MSVC )
|
||||||
# Update svnrevision.h
|
# Update svnrevision.h
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${CMAKE_SOURCE_DIR}/src/svnrevision.h
|
add_custom_command( OUTPUT ${CMAKE_SOURCE_DIR}/src/svnrevision.h
|
||||||
COMMAND updaterevision . src/svnrevision.h
|
COMMAND ${CMAKE_BINARY_DIR}/tools/updaterevision/updaterevision . src/svnrevision.h
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
DEPENDS updaterevision )
|
DEPENDS updaterevision )
|
||||||
|
|
||||||
|
@ -300,6 +302,7 @@ else( WIN32 )
|
||||||
set( SYSTEM_SOURCES
|
set( SYSTEM_SOURCES
|
||||||
sdl/crashcatcher.c
|
sdl/crashcatcher.c
|
||||||
sdl/hardware.cpp
|
sdl/hardware.cpp
|
||||||
|
sdl/i_cd.cpp
|
||||||
sdl/i_input.cpp
|
sdl/i_input.cpp
|
||||||
sdl/i_main.cpp
|
sdl/i_main.cpp
|
||||||
sdl/i_movie.cpp
|
sdl/i_movie.cpp
|
||||||
|
@ -323,12 +326,12 @@ endif( NOT NO_ASM )
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.h
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.h
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y .
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y .
|
||||||
COMMAND lemon xlat_parser.y
|
COMMAND ${CMAKE_BINARY_DIR}/tools/lemon/lemon xlat_parser.y
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
DEPENDS lemon ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y )
|
DEPENDS lemon ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y )
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h
|
||||||
COMMAND re2c --no-generation-date -s -o ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h ${CMAKE_CURRENT_SOURCE_DIR}/sc_man_scanner.re
|
COMMAND ${CMAKE_BINARY_DIR}/tools/re2c/re2c --no-generation-date -s -o ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h ${CMAKE_CURRENT_SOURCE_DIR}/sc_man_scanner.re
|
||||||
DEPENDS re2c ${CMAKE_CURRENT_SOURCE_DIR}/sc_man_scanner.re )
|
DEPENDS re2c ${CMAKE_CURRENT_SOURCE_DIR}/sc_man_scanner.re )
|
||||||
|
|
||||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
|
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
|
||||||
|
@ -680,9 +683,18 @@ include_directories( .
|
||||||
|
|
||||||
add_dependencies( zdoom revision_check )
|
add_dependencies( zdoom revision_check )
|
||||||
|
|
||||||
|
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
|
||||||
|
# Linux distributions are slow to adopt 2.6. :(
|
||||||
set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
|
set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
|
||||||
set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} )
|
set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} )
|
||||||
|
|
||||||
|
if( NOT WIN32 )
|
||||||
|
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${ZDOOM_EXE_NAME} ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME}; fi" )
|
||||||
|
add_custom_command( TARGET zdoom POST_BUILD
|
||||||
|
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
|
||||||
|
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
|
||||||
|
endif( NOT WIN32 )
|
||||||
|
|
||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
# GCC misoptimizes this file
|
# GCC misoptimizes this file
|
||||||
set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
|
set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
|
||||||
|
|
|
@ -2068,7 +2068,7 @@ void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, mapside
|
||||||
// upper "texture" is light color
|
// upper "texture" is light color
|
||||||
// lower "texture" is fog color
|
// lower "texture" is fog color
|
||||||
{
|
{
|
||||||
DWORD color, fog;
|
DWORD color = MAKERGB(255,255,255), fog = 0;
|
||||||
bool colorgood, foggood;
|
bool colorgood, foggood;
|
||||||
|
|
||||||
SetTextureNoErr (sd, side_t::bottom, &fog, msd->bottomtexture, &foggood);
|
SetTextureNoErr (sd, side_t::bottom, &fog, msd->bottomtexture, &foggood);
|
||||||
|
|
|
@ -947,7 +947,7 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this actor is already playing something on the selected channel, stop it.
|
// If this actor is already playing something on the selected channel, stop it.
|
||||||
if (type != SOURCE_None && (actor == NULL && channel != CHAN_AUTO) || (actor != NULL && actor->SoundChans & (1 << channel)))
|
if (type != SOURCE_None && ((actor == NULL && channel != CHAN_AUTO) || (actor != NULL && actor->SoundChans & (1 << channel))))
|
||||||
{
|
{
|
||||||
for (chan = Channels; chan != NULL; chan = chan->NextChan)
|
for (chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,9 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#ifndef NO_GTK
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#endif
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#include "doomerrors.h"
|
#include "doomerrors.h"
|
||||||
|
@ -72,7 +74,9 @@ extern "C" int cc_install_handlers(int, int*, const char*, int(*)(char*, char*))
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef NO_GTK
|
||||||
bool GtkAvailable;
|
bool GtkAvailable;
|
||||||
|
#endif
|
||||||
|
|
||||||
// The command line arguments.
|
// The command line arguments.
|
||||||
DArgs *Args;
|
DArgs *Args;
|
||||||
|
@ -207,7 +211,9 @@ int main (int argc, char **argv)
|
||||||
seteuid (getuid ());
|
seteuid (getuid ());
|
||||||
std::set_new_handler (NewFailure);
|
std::set_new_handler (NewFailure);
|
||||||
|
|
||||||
|
#ifndef NO_GTK
|
||||||
GtkAvailable = gtk_init_check (&argc, &argv);
|
GtkAvailable = gtk_init_check (&argc, &argv);
|
||||||
|
#endif
|
||||||
|
|
||||||
setlocale (LC_ALL, "C");
|
setlocale (LC_ALL, "C");
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,10 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifndef NO_GTK
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "doomerrors.h"
|
#include "doomerrors.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -72,7 +74,9 @@ extern "C"
|
||||||
CPUInfo CPU;
|
CPUInfo CPU;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_GTK
|
||||||
extern bool GtkAvailable;
|
extern bool GtkAvailable;
|
||||||
|
#endif
|
||||||
|
|
||||||
void CalculateCPUSpeed ();
|
void CalculateCPUSpeed ();
|
||||||
|
|
||||||
|
@ -342,6 +346,7 @@ void I_PrintStr (const char *cp)
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_GTK
|
||||||
// GtkTreeViews eats return keys. I want this to be like a Windows listbox
|
// GtkTreeViews eats return keys. I want this to be like a Windows listbox
|
||||||
// where pressing Return can still activate the default button.
|
// where pressing Return can still activate the default button.
|
||||||
gint AllowDefault(GtkWidget *widget, GdkEventKey *event, gpointer func_data)
|
gint AllowDefault(GtkWidget *widget, GdkEventKey *event, gpointer func_data)
|
||||||
|
@ -514,6 +519,7 @@ int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||||
{
|
{
|
||||||
|
@ -524,10 +530,12 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||||
return defaultiwad;
|
return defaultiwad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_GTK
|
||||||
if (GtkAvailable)
|
if (GtkAvailable)
|
||||||
{
|
{
|
||||||
return I_PickIWad_Gtk (wads, numwads, showwin, defaultiwad);
|
return I_PickIWad_Gtk (wads, numwads, showwin, defaultiwad);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
printf ("Please select a game wad (or 0 to exit):\n");
|
printf ("Please select a game wad (or 0 to exit):\n");
|
||||||
for (i = 0; i < numwads; ++i)
|
for (i = 0; i < numwads; ++i)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
|
|
||||||
add_subdirectory( lemon )
|
add_subdirectory( lemon )
|
||||||
add_subdirectory( re2c )
|
add_subdirectory( re2c )
|
||||||
|
|
|
@ -1,19 +1,24 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( dehsupp )
|
include( CheckFunctionExists )
|
||||||
|
|
||||||
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parse.h ${CMAKE_CURRENT_BINARY_DIR}/parse.c
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parse.h ${CMAKE_CURRENT_BINARY_DIR}/parse.c
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/parse.y ${CMAKE_CURRENT_BINARY_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/parse.y ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMAND lemon parse.y
|
COMMAND ${CMAKE_BINARY_DIR}/tools/lemon/lemon parse.y
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
DEPENDS lemon parse.y )
|
DEPENDS lemon parse.y )
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/scanner.c
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/scanner.c
|
||||||
COMMAND re2c -s -o ${CMAKE_CURRENT_BINARY_DIR}/scanner.c ${CMAKE_CURRENT_SOURCE_DIR}/scanner.re
|
COMMAND ${CMAKE_BINARY_DIR}/tools/re2c/re2c -s -o ${CMAKE_CURRENT_BINARY_DIR}/scanner.c ${CMAKE_CURRENT_SOURCE_DIR}/scanner.re
|
||||||
DEPENDS re2c scanner.re )
|
DEPENDS re2c scanner.re )
|
||||||
|
|
||||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
|
|
||||||
|
CHECK_FUNCTION_EXISTS( stricmp STRICMP_EXISTS )
|
||||||
|
if( NOT STRICMP_EXISTS )
|
||||||
|
add_definitions( -Dstricmp=strcasecmp )
|
||||||
|
endif( NOT STRICMP_EXISTS )
|
||||||
|
|
||||||
add_executable( dehsupp dehsupp.c parse.c scanner.c )
|
add_executable( dehsupp dehsupp.c parse.c scanner.c )
|
||||||
add_dependencies( dehsupp ${CMAKE_CURRENT_BINARY_DIR}/parse.c ${CMAKE_CURRENT_BINARY_DIR}/scanner.c )
|
add_dependencies( dehsupp ${CMAKE_CURRENT_BINARY_DIR}/parse.c ${CMAKE_CURRENT_BINARY_DIR}/scanner.c )
|
||||||
|
|
|
@ -122,7 +122,10 @@ ESC = [\\] ([abfnrtv?'"\\] | "x" H+ | O+);
|
||||||
|
|
||||||
any
|
any
|
||||||
{
|
{
|
||||||
printf("unexpected character: %c\n", *s->tok);
|
if (*s->tok != '\r')
|
||||||
|
{
|
||||||
|
printf("unexpected character: %c (%#02x)\n", *s->tok, *s->tok);
|
||||||
|
}
|
||||||
goto std;
|
goto std;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( fixrtext )
|
|
||||||
|
|
||||||
add_executable( fixrtext fixrtext.c )
|
add_executable( fixrtext fixrtext.c )
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( lemon )
|
|
||||||
|
|
||||||
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.4 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
include( CheckIncludeFiles )
|
|
||||||
include( CheckFunctionExists )
|
include( CheckFunctionExists )
|
||||||
include( CheckTypeSize )
|
include( CheckTypeSize )
|
||||||
|
|
||||||
|
@ -9,11 +8,6 @@ set( PACKAGE_VERSION 0.12.3 )
|
||||||
set( PACKAGE_STRING "re2c 0.12.3" )
|
set( PACKAGE_STRING "re2c 0.12.3" )
|
||||||
set( PACKAGE_BUGREPORT "re2c-general@lists.sourceforge.net" )
|
set( PACKAGE_BUGREPORT "re2c-general@lists.sourceforge.net" )
|
||||||
|
|
||||||
set( PACKAGE ${PACKAGE_NAME} )
|
|
||||||
set( VERSION ${PACKAGE_VERSION} )
|
|
||||||
|
|
||||||
CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H )
|
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS( strdup HAVE_STRDUP )
|
CHECK_FUNCTION_EXISTS( strdup HAVE_STRDUP )
|
||||||
CHECK_FUNCTION_EXISTS( strndup HAVE_STRNDUP )
|
CHECK_FUNCTION_EXISTS( strndup HAVE_STRNDUP )
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( updaterevision )
|
|
||||||
|
|
||||||
if( WIN32 )
|
if( WIN32 )
|
||||||
if( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
|
|
||||||
add_custom_command( OUTPUT generated/dehsupp.lmp
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/generated
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/generated
|
||||||
COMMAND dehsupp ${CMAKE_CURRENT_SOURCE_DIR}/sources/dehsupp.txt ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp
|
COMMAND ${CMAKE_BINARY_DIR}/tools/dehsupp/dehsupp ${CMAKE_CURRENT_SOURCE_DIR}/sources/dehsupp.txt ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp
|
||||||
DEPENDS dehsupp ${CMAKE_CURRENT_SOURCE_DIR}/sources/dehsupp.txt )
|
DEPENDS dehsupp ${CMAKE_CURRENT_SOURCE_DIR}/sources/dehsupp.txt )
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
|
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
|
||||||
COMMAND zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
|
COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
|
||||||
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp )
|
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp )
|
||||||
|
|
||||||
add_custom_target( pk3 ALL
|
add_custom_target( pk3 ALL
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cmake_minimum_required( VERSION 2.6 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project( z )
|
|
||||||
|
|
||||||
if( CMAKE_COMPILER_IS_GNUC )
|
if( CMAKE_COMPILER_IS_GNUC )
|
||||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fomit-frame-pointer" )
|
||||||
|
|
Loading…
Reference in a new issue