mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-22 11:51:19 +00:00
6d799f0a1c
vertices instead of lines.) On large maps, this can result in a very significant speed up. (In one particular map, ZDBSP had previously spent 40% of its time just scanning through all the vertices in the map. Now the time it spends finding vertices is immeasurable. Now 68% of its time on that map is spent inside ClassifyLine--because that routine is called more than 16 million times, which suggests that even a minor speedup in that routine should have a big impact--if I could just think of how that might happen.) On small maps, this won't make much of a difference, because the number of vertices to search was so small to begin with. SVN r167 (trunk)
82 lines
1.7 KiB
Makefile
82 lines
1.7 KiB
Makefile
CFLAGS = -Wall -fomit-frame-pointer -Izlib -pipe -ffast-math -MMD
|
|
|
|
# Optimization flags
|
|
CFLAGS += -O3 -fomit-frame-pointer -DNDEBUG
|
|
|
|
# Unoptimization flags
|
|
#CFLAGS += -g -D_DEBUG
|
|
|
|
# Processor features flags
|
|
CFLAGS += -mtune=i686
|
|
#CFLAGS += -march=k8 -mfpmath=sse
|
|
|
|
LDFLAGS =
|
|
RM = rm -f FILE
|
|
ZLIBDIR = zlib/
|
|
|
|
ifeq (Windows_NT,$(OS))
|
|
EXE = zdbsp.exe
|
|
LDFLAGS += -luser32 -lgdi32
|
|
ifneq (msys,$(OSTYPE))
|
|
RM = del /q /f FILE 2>nul
|
|
ZLIBDIR = "zlib\"
|
|
endif
|
|
else
|
|
EXE = zdbsp
|
|
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNO_MAP_VIEWER=1
|
|
endif
|
|
|
|
# To generate profiling information for gprof, pass gprof=1 to make.
|
|
ifneq ($(gprof),)
|
|
CFLAGS += -g -fno-omit-frame-pointer -pg
|
|
LDFLAGS += -g -pg
|
|
endif
|
|
|
|
# To strip debugging symbols, pass strip=1 to make.
|
|
ifneq ($(strip),)
|
|
LDFLAGS += -s
|
|
endif
|
|
|
|
CC = gcc
|
|
CXX = g++
|
|
|
|
CXXFLAGS = $(CFLAGS)
|
|
|
|
OBJS = main.o getopt.o getopt1.o blockmapbuilder.o processor.o view.o wad.o \
|
|
nodebuild.o nodebuild_events.o nodebuild_extract.o nodebuild_gl.o \
|
|
nodebuild_utility.o \
|
|
zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/trees.o \
|
|
zlib/zutil.o
|
|
|
|
all: $(EXE)
|
|
|
|
profile:
|
|
$(MAKE) clean
|
|
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LDFLAGS="$(LDFLAGS) -lgcov"
|
|
@echo "Process a few maps, then rebuild with make profile-use"
|
|
|
|
profile-use:
|
|
$(MAKE) clean
|
|
$(MAKE) all CXXFLAGS="$(CXXFLAGS) -fprofile-use"
|
|
|
|
$(EXE): $(OBJS)
|
|
$(CCDV) $(CXX) -o $(EXE) $(OBJS) $(LDFLAGS)
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
$(subst FILE,$(EXE),$(RM))
|
|
$(subst FILE,*.o,$(RM))
|
|
$(subst FILE,*.d,$(RM))
|
|
$(subst FILE,$(ZLIBDIR)*.o,$(RM))
|
|
$(subst FILE,$(ZLIBDIR)*.d,$(RM))
|
|
|
|
cleanprof:
|
|
$(subst FILE,*.gc*,$(RM))
|
|
$(subst FILE,$(ZLIBDIR)*.gc*,$(RM))
|
|
|
|
cleanall: clean cleanprof
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
-include $(OBJS:%.o=%.d)
|
|
endif
|