mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
c54f2f66fc
while and killing centaurs with the flechette. - Fixed: Moving to an old level in a hub caused the old player's inventory to spawn owned by the current player (but still hanging off the old player), so the game would hang when trying to delete it. - Modified re2c so that it doesn't add a date to the file it generates. Thus, if it regenerates a file during a full rebuild, SVN won't see it as a change. Also updated it to 0.10.5. - Fixed: SC_GetString() did not properly terminate sc_String when the last token in the file had no white space after it. Since I could not actually find the problem (it works fine in debug mode and I saw no logic errors), I decided to take this opportunity to reimplement it using an re2c-generated scanner. Now it's 1.6x faster than before and correctness is easier to verify. - Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels. - Added back the Manifest to zdoom.rc for non-VC8 Windows compilers. - Fixed MinGW compilation again. Now it uses the same method as Makefile.linux to find all the source files so that it doesn't need to be manually updated each time source files are added or removed. - Added the SVN revision number to the version string. A new tool is used to obtain this information from the svnversion command and write it into a header file. If you don't have the svn command line tools installed or didn't check it out from the repository, you can still build. I added some rules for this to Makefile.linux, and I assume they work because they do for Makefile.mingw. - Fixed: MIDISong2 did not delete MusHeader in its destructor. SVN r200 (trunk)
119 lines
3.7 KiB
Text
119 lines
3.7 KiB
Text
# Sub-makefile autogenerated by premake
|
|
# And then tweaked by hand
|
|
|
|
# Where did you install the FMOD API to? Change this line so that the build process can find it.
|
|
FMODDIR = "c:/program files/fmodapi375win"
|
|
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
|
|
CONFIG ?= Release
|
|
OPTLEVEL ?= 2
|
|
ARCH_TYPE ?= pentium
|
|
TUNE_TYPE ?= i686
|
|
RELEASETARGET ?= zdoomgcc.exe
|
|
DEBUGTARGET ?= zdoomgccd.exe
|
|
DEBUGOBJDIR ?= debugobj
|
|
RELEASEOBJDIR ?= releaseobj
|
|
|
|
CCDV = @ccdv
|
|
RE2C = tools/re2c/re2c
|
|
|
|
CPPFLAGS = -DWIN32 -D_WIN32 -D_WINDOWS -DHAVE_STRUPR -DHAVE_FILELENGTH -DI_DO_NOT_LIKE_BIG_DOWNLOADS -D__forceinline=inline -MMD -Izlib -IFLAC -Isrc -Isrc/win32 -Isrc/g_doom -Isrc/g_heretic -I src/g_hexen -Isrc/g_raven -Isrc/g_strife -Isrc/g_shared -Isrc/oplsynth -Isrc/sound
|
|
LDFLAGS += flac/libflac.a zlib/libz.a -lfmod -lwsock32 -lwinmm -lddraw -ldsound -ldxguid -ldinput8 -lole32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lsetupapi -lws2_32 -Wl,--subsystem,windows
|
|
|
|
ifdef FMODDIR
|
|
CPPFLAGS += -I$(FMODDIR)/api/inc
|
|
LDFLAGS += -L$(FMODDIR)/api/lib
|
|
endif
|
|
|
|
CFLAGS += -fno-strict-aliasing
|
|
|
|
ifeq ($(CONFIG),Debug)
|
|
OBJDIR = $(DEBUGOBJDIR)
|
|
CFLAGS += $(CPPFLAGS) -Wall -Wno-unused -g3
|
|
CPPFLAGS += -D_DEBUG
|
|
CXXFLAGS = $(CFLAGS)
|
|
TARGET = $(DEBUGTARGET)
|
|
endif
|
|
ifeq ($(CONFIG),Release)
|
|
OBJDIR = $(RELEASEOBJDIR)
|
|
CFLAGS += $(CPPFLAGS) -march=$(ARCH_TYPE) -mtune=$(TUNE_TYPE) -Wall -Wno-unused -O$(OPTLEVEL) -fomit-frame-pointer -pipe
|
|
CFLAGS += -ffunction-sections -fno-rtti
|
|
CPPFLAGS += -DNDEBUG
|
|
CXXFLAGS = $(CFLAGS)
|
|
LDFLAGS += -s -Wl,-Map=zdoomgcc.map -Wl,--gc-sections
|
|
TARGET = $(RELEASETARGET)
|
|
endif
|
|
|
|
SRCDIRS = src/ $(addprefix src/,g_doom/ g_heretic/ g_hexen/ g_raven/ g_shared/ g_strife/ oplsynth/ sound/ win32/)
|
|
VPATH = $(SRCDIRS)
|
|
|
|
CPPSRCS = $(wildcard $(addsuffix *.cpp,$(SRCDIRS)))
|
|
CSRCS = $(wildcard $(addsuffix *.c,$(SRCDIRS)))
|
|
RCSRCS = $(wildcard $(addsuffix *.rc,$(SRCDIRS)))
|
|
ifdef NOASM
|
|
CFLAGS += -DNOASM
|
|
else
|
|
ASRCS = $(wildcard src/*.nas)
|
|
CFLAGS += -DUSEASM=1
|
|
endif
|
|
SRCS = $(CSRCS) $(CPPSRCS) $(ASRCS)
|
|
CPPOBJFILES = $(notdir $(CPPSRCS:%.cpp=%.o))
|
|
COBJFILES = $(notdir $(CSRCS:%.c=%.o))
|
|
AOBJFILES = $(notdir $(ASRCS:%.nas=%.o))
|
|
RCOBJFILES = $(notdir $(RCSRCS:%.rc=%.o))
|
|
|
|
COBJS = $(addprefix $(OBJDIR)/,$(CPPOBJFILES) $(COBJFILES) $(RCOBJFILES))
|
|
DEPS = $(patsubst %.o,%.d,$(COBJS))
|
|
UNORDEREDOBJS = $(addprefix $(OBJDIR)/,$(AOBJFILES)) $(COBJS)
|
|
|
|
OBJS = $(OBJDIR)/autostart.o $(filter-out %/autostart.o %/autozend.o,$(UNORDEREDOBJS)) $(OBJDIR)/autozend.o
|
|
|
|
all: $(TARGET)
|
|
|
|
# This file needs special handling so that it actually gets compiled with SSE2 support.
|
|
$(OBJDIR)/nodebuild_classify_sse2.o: src/nodebuild_classify_sse2.cpp
|
|
$(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $<
|
|
|
|
src/sc_man_scanner.h: src/sc_man_scanner.re
|
|
$(CCDV) $(RE2C) -s -o $@ $<
|
|
|
|
$(OBJDIR)/%.o : %.cpp
|
|
$(CCDV) $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
$(OBJDIR)/%.o : %.nas
|
|
$(CCDV) nasmw -o $@ -f win32 $<
|
|
|
|
$(OBJDIR)/%.o : %.rc
|
|
$(CCDV) windres --include-dir=src/win32 -o $@ -i $<
|
|
|
|
|
|
$(TARGET): testobjdir updaterev $(OBJS)
|
|
$(CCDV) $(CXX) -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
clean:
|
|
-del /q /f $(RELEASETARGET) 2>nul
|
|
-del /q /f $(DEBUGTARGET) 2>nul
|
|
-del /q /f $(DEBUGOBJDIR) 2>nul
|
|
-del /q /f $(RELEASEOBJDIR) 2>nul
|
|
|
|
cleandep:
|
|
-del /q /f $(DEBUGOBJDIR)\*.d 2>nul
|
|
-del /q /f $(RELEASEOBJDIR)\*.d 2>nul
|
|
|
|
testobjdir:
|
|
-@if not exist $(OBJDIR) mkdir $(OBJDIR)
|
|
|
|
updaterev: tools/updaterevision/updaterevision.exe
|
|
@tools/updaterevision/updaterevision . src/svnrevision.h
|
|
|
|
tools/updaterevision/updaterevision.exe:
|
|
$(MAKE) -C tools/updaterevision
|
|
|
|
|
|
ifeq (,$(findstring $(MAKECMDGOALS),clean cleandep updaterev))
|
|
-include $(DEPS)
|
|
endif
|
|
|
|
.PHONY: clean all updaterev testobjdir cleandep
|