mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Added Jim's latest changes to the Linux makefiles.
SVN r166 (trunk)
This commit is contained in:
parent
9e5d7c3289
commit
6975103dd9
2 changed files with 25 additions and 23 deletions
|
@ -2,14 +2,14 @@
|
||||||
CXX ?= g++
|
CXX ?= g++
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
NASM ?= nasm
|
NASM ?= nasm
|
||||||
ifndef DEBUG
|
ifdef DEBUG
|
||||||
ifndef NOGC
|
CFLAGS ?= -pipe -Wall -Wno-unused
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -ffunction-sections -fvtable-gc -fno-rtti
|
|
||||||
else
|
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -ffunction-sections -fno-rtti
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused
|
CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -fno-rtti
|
||||||
|
endif
|
||||||
|
ifdef GC
|
||||||
|
CFLAGS += -ffunction-sections
|
||||||
|
LDFLAGS += -Wl,--gc-sections
|
||||||
endif
|
endif
|
||||||
CFLAGS += -DHAVE_FILELENGTH -D__forceinline=inline -Izlib -IFLAC `sdl-config --cflags`
|
CFLAGS += -DHAVE_FILELENGTH -D__forceinline=inline -Izlib -IFLAC `sdl-config --cflags`
|
||||||
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
|
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
|
||||||
|
@ -25,11 +25,11 @@ DEBUGOBJ ?= debugobj
|
||||||
|
|
||||||
CPPSRCS = $(wildcard $(addsuffix *.cpp,$(SRCDIRS)))
|
CPPSRCS = $(wildcard $(addsuffix *.cpp,$(SRCDIRS)))
|
||||||
CSRCS = $(wildcard $(addsuffix *.c,$(SRCDIRS)))
|
CSRCS = $(wildcard $(addsuffix *.c,$(SRCDIRS)))
|
||||||
ifndef NOASM
|
ifdef NOASM
|
||||||
|
CFLAGS += -DNOASM
|
||||||
|
else
|
||||||
ASRCS = $(wildcard src/*.nas)
|
ASRCS = $(wildcard src/*.nas)
|
||||||
CFLAGS += -DUSEASM=1
|
CFLAGS += -DUSEASM=1
|
||||||
else
|
|
||||||
CFLAGS += -DNOASM
|
|
||||||
endif
|
endif
|
||||||
SRCS = $(CSRCS) $(CPPSRCS) $(ASRCS)
|
SRCS = $(CSRCS) $(CPPSRCS) $(ASRCS)
|
||||||
CPPOBJFILES = $(notdir $(patsubst %.cpp,%.o,$(CPPSRCS)))
|
CPPOBJFILES = $(notdir $(patsubst %.cpp,%.o,$(CPPSRCS)))
|
||||||
|
@ -39,20 +39,16 @@ AOBJFILES = $(notdir $(patsubst %.nas,%.o,$(ASRCS)))
|
||||||
ZDOOM = zdoom
|
ZDOOM = zdoom
|
||||||
ZDOOMDEBUG = zdoomd
|
ZDOOMDEBUG = zdoomd
|
||||||
|
|
||||||
ifndef DEBUG
|
ifdef DEBUG
|
||||||
OBJDIR = $(RELEASEOBJ)
|
|
||||||
CFLAGS += -DNDEBUG
|
|
||||||
ifndef NOGC
|
|
||||||
LDFLAGS += -s -Wl,--gc-sections,-Map=$(ZDOOM).map
|
|
||||||
else
|
|
||||||
LDFLAGS += -s -Wl,-Map=$(ZDOOM).map
|
|
||||||
endif
|
|
||||||
ZDOOMBIN = $(ZDOOM)
|
|
||||||
else
|
|
||||||
OBJDIR = $(DEBUGOBJ)
|
OBJDIR = $(DEBUGOBJ)
|
||||||
CFLAGS += -D_DEBUG -g3
|
CFLAGS += -D_DEBUG -g3
|
||||||
NASMFLAGS += -g
|
NASMFLAGS += -g
|
||||||
ZDOOMBIN = $(ZDOOMDEBUG)
|
ZDOOMBIN = $(ZDOOMDEBUG)
|
||||||
|
else
|
||||||
|
OBJDIR = $(RELEASEOBJ)
|
||||||
|
CFLAGS += -DNDEBUG
|
||||||
|
LDFLAGS += -s -Wl,-Map=$(ZDOOM).map
|
||||||
|
ZDOOMBIN = $(ZDOOM)
|
||||||
endif
|
endif
|
||||||
CXXFLAGS += $(CFLAGS)
|
CXXFLAGS += $(CFLAGS)
|
||||||
|
|
||||||
|
|
12
default.cbd
12
default.cbd
|
@ -52,10 +52,16 @@ do ifopt debug
|
||||||
TARGET = "${DEBUGTARGET}"
|
TARGET = "${DEBUGTARGET}"
|
||||||
else
|
else
|
||||||
OBJDIR = "${RELEASEOBJDIR}"
|
OBJDIR = "${RELEASEOBJDIR}"
|
||||||
CFLAGS += "-march=${ARCH_TYPE} -mtune=${TUNE_TYPE} -Wall -Wno-unused -O${OPTLEVEL} -fomit-frame-pointer -ffunction-sections -fvtable-gc -fno-rtti"
|
CFLAGS += "-march=${ARCH_TYPE} -mtune=${TUNE_TYPE} -Wall -Wno-unused -O${OPTLEVEL} -fomit-frame-pointer -ffunction-sections -fno-rtti"
|
||||||
|
ifopt gc
|
||||||
|
CFLAGS += "-march=${ARCH_TYPE} -mtune=${TUNE_TYPE} -Wall -Wno-unused -O${OPTLEL} -fomit-frame-pointer -fno-rtti"
|
||||||
|
done
|
||||||
CPPFLAGS += " -DNDEBUG"
|
CPPFLAGS += " -DNDEBUG"
|
||||||
CXXFLAGS = "${CFLAGS}"
|
CXXFLAGS = "${CFLAGS}"
|
||||||
LDFLAGS += " -s -Wl,--gc-sections,-Map=zdoomgcc.map"
|
LDFLAGS += " -s -Wl,-Map=zdoomgcc.map"
|
||||||
|
ifopt gc
|
||||||
|
LDFLAGS += " -Wl,--gc-sections"
|
||||||
|
done
|
||||||
TARGET = "${RELEASETARGET}"
|
TARGET = "${RELEASETARGET}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -457,7 +463,7 @@ ${COMPILER} xlat-parse.tab.c gen.c
|
||||||
${LINK} tools/xlatcc/xlatcc
|
${LINK} tools/xlatcc/xlatcc
|
||||||
|
|
||||||
src_paths tools/dehsupp
|
src_paths tools/dehsupp
|
||||||
${COMPILER} parse.tab.c
|
${COMPILER} parse.c scanner.c dehsupp.c
|
||||||
${LINK} tools/dehsupp/dehsupp
|
${LINK} tools/dehsupp/dehsupp
|
||||||
|
|
||||||
do if "${EVILCLEAN}"="1"
|
do if "${EVILCLEAN}"="1"
|
||||||
|
|
Loading…
Reference in a new issue