mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +00:00
Added Jim's and Mannequin's latest Linux makefile submissions.
SVN r154 (trunk)
This commit is contained in:
parent
12b066ef2e
commit
92dff5f302
7 changed files with 71 additions and 36 deletions
|
@ -3,9 +3,13 @@ CXX ?= g++
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
NASM ?= nasm
|
NASM ?= nasm
|
||||||
ifndef DEBUG
|
ifndef DEBUG
|
||||||
CFLAGS ?= -pipe -Wall -Wno-unused -O2 -fomit-frame-pointer -ffunction-sections -fvtable-gc -fno-rtti
|
ifndef NOGC
|
||||||
|
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
|
||||||
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
|
||||||
|
@ -38,7 +42,11 @@ ZDOOMDEBUG = zdoomd
|
||||||
ifndef DEBUG
|
ifndef DEBUG
|
||||||
OBJDIR = $(RELEASEOBJ)
|
OBJDIR = $(RELEASEOBJ)
|
||||||
CFLAGS += -DNDEBUG
|
CFLAGS += -DNDEBUG
|
||||||
LDFLAGS += -s -Wl,--gc-sections,-Map=$(ZDOOM).map
|
ifndef NOGC
|
||||||
|
LDFLAGS += -s -Wl,--gc-sections,-Map=$(ZDOOM).map
|
||||||
|
else
|
||||||
|
LDFLAGS += -s -Wl,-Map=$(ZDOOM).map
|
||||||
|
endif
|
||||||
ZDOOMBIN = $(ZDOOM)
|
ZDOOMBIN = $(ZDOOM)
|
||||||
else
|
else
|
||||||
OBJDIR = $(DEBUGOBJ)
|
OBJDIR = $(DEBUGOBJ)
|
||||||
|
|
|
@ -4,11 +4,12 @@ ifeq (Windows_NT,$(OS))
|
||||||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||||
else
|
else
|
||||||
EXE = dehsupp
|
EXE = dehsupp
|
||||||
CCDV =
|
CCDV =
|
||||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
LDFLAGS = -s
|
||||||
|
|
||||||
RE2C = ../re2c/re2c
|
RE2C = ../re2c/re2c
|
||||||
LEMON = ../lemon/lemon
|
LEMON = ../lemon/lemon
|
||||||
|
@ -20,7 +21,7 @@ OBJS = dehsupp.o parse.o scanner.o
|
||||||
all: $(EXE)
|
all: $(EXE)
|
||||||
|
|
||||||
$(EXE): $(OBJS)
|
$(EXE): $(OBJS)
|
||||||
$(CCDV) $(CC) -o $(EXE) $(OBJS)
|
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
|
|
36
tools/lemon/Makefile
Normal file
36
tools/lemon/Makefile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
ifeq (Windows_NT,$(OS))
|
||||||
|
EXE = lemon.exe
|
||||||
|
CCDV = @../../ccdv
|
||||||
|
CFLAGS = $(LOC) -D_WIN32 -Os -Wall -Wno-implicit -fomit-frame-pointer
|
||||||
|
else
|
||||||
|
EXE = lemon
|
||||||
|
CCDV =
|
||||||
|
CFLAGS = -Os -Wall -Wno-implicit -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
LDFLAGS = -s
|
||||||
|
|
||||||
|
OBJS = lemon.o
|
||||||
|
|
||||||
|
all: $(EXE)
|
||||||
|
|
||||||
|
$(EXE): $(OBJS)
|
||||||
|
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
ifeq (Windows_NT,$(OS))
|
||||||
|
-del /q /f $(EXE) 2>nul
|
||||||
|
-del /q /f *.o 2>nul
|
||||||
|
else
|
||||||
|
rm -f $(EXE)
|
||||||
|
rm -f *.o
|
||||||
|
endif
|
||||||
|
|
||||||
|
lemon.o: lemon.c lempar.c
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
EXE = lemon.exe
|
|
||||||
|
|
||||||
CCDV = @../../ccdv
|
|
||||||
CC = gcc
|
|
||||||
CFLAGS = $(LOC) -D_WIN32 -Os -Wall -Wno-implicit -fomit-frame-pointer
|
|
||||||
|
|
||||||
OBJS = lemon.o
|
|
||||||
|
|
||||||
all: $(EXE)
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
$(EXE): $(OBJS)
|
|
||||||
$(CCDV) $(CC) -o $(EXE) $(OBJS)
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-del /q /f $(EXE) 2>nul
|
|
||||||
-del /q /f *.o 2>nul
|
|
||||||
|
|
||||||
lemon.o: lemon.c lempar.c
|
|
|
@ -2,13 +2,13 @@ ifeq (Windows_NT,$(OS))
|
||||||
EXE = makewad.exe
|
EXE = makewad.exe
|
||||||
CCDV = @../../ccdv
|
CCDV = @../../ccdv
|
||||||
CFLAGS = -Os -Wall -fomit-frame-pointer
|
CFLAGS = -Os -Wall -fomit-frame-pointer
|
||||||
LDFLAGS = -L../../zlib/ -lz
|
LDFLAGS = -s -L../../zlib/ -lz
|
||||||
ZLIB = ../../zlib/libz.a
|
ZLIB = ../../zlib/libz.a
|
||||||
else
|
else
|
||||||
EXE = makewad
|
EXE = makewad
|
||||||
CCDV =
|
CCDV =
|
||||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||||
LDFLAGS = -lz
|
LDFLAGS = -s -lz
|
||||||
ZLIB =
|
ZLIB =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
EXE = re2c.exe
|
ifeq (Windows_NT,$(OS))
|
||||||
|
EXE = re2c.exe
|
||||||
|
CCDV = @../../ccdv
|
||||||
|
CXXFLAGS = $(LOC) -D_WIN32 -DNDEBUG -Os -Wall -Wno-unused
|
||||||
|
else
|
||||||
|
EXE = re2c
|
||||||
|
CCDV =
|
||||||
|
CXXFLAGS = -DHAVE_CONFIG_H -DNDEBUG -Os -Wall -Wno-unused
|
||||||
|
endif
|
||||||
|
|
||||||
CCDV = @../../ccdv
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
CXXFLAGS = $(LOC) -D_WIN32 -DNDEBUG -Os -Wall -Wno-unused
|
LDFLAGS= -s
|
||||||
|
|
||||||
OBJS = actions.o code.o dfa.o main.o mbo_getopt.o parser.o scanner.o substr.o translate.o
|
OBJS = actions.o code.o dfa.o main.o mbo_getopt.o parser.o scanner.o substr.o translate.o
|
||||||
|
|
||||||
|
@ -12,13 +19,18 @@ all: $(EXE)
|
||||||
$(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $<
|
$(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
$(EXE): $(OBJS)
|
$(EXE): $(OBJS)
|
||||||
$(CCDV) $(CXX) -s -o $(EXE) $(OBJS)
|
$(CCDV) $(CXX) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
ifeq (Windows_NT,$(OS))
|
||||||
-del /q /f $(EXE) 2>nul
|
-del /q /f $(EXE) 2>nul
|
||||||
-del /q /f *.o 2>nul
|
-del /q /f *.o 2>nul
|
||||||
|
else
|
||||||
|
rm -f $(EXE)
|
||||||
|
rm -f *.o
|
||||||
|
endif
|
||||||
|
|
||||||
actions.o: actions.cc
|
actions.o: actions.cc
|
||||||
code.o: code.cc
|
code.o: code.cc
|
|
@ -4,11 +4,12 @@ ifeq (Windows_NT,$(OS))
|
||||||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||||
else
|
else
|
||||||
EXE = xlatcc
|
EXE = xlatcc
|
||||||
CCDV =
|
CCDV =
|
||||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp $(LOC) -Os -Wall -fomit-frame-pointer
|
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp $(LOC) -Os -Wall -fomit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
LDFLAGS= -s
|
||||||
|
|
||||||
BISON = bison
|
BISON = bison
|
||||||
BISONFLAGS =
|
BISONFLAGS =
|
||||||
|
@ -18,7 +19,7 @@ OBJS = gen.o xlat-parse.tab.o
|
||||||
all: $(EXE)
|
all: $(EXE)
|
||||||
|
|
||||||
$(EXE): $(OBJS)
|
$(EXE): $(OBJS)
|
||||||
$(CCDV) $(CC) -o $(EXE) $(OBJS)
|
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue