mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +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
|
||||
NASM ?= nasm
|
||||
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
|
||||
CFLAGS ?= -pipe -Wall -Wno-unused
|
||||
CFLAGS ?= -pipe -Wall -Wno-unused
|
||||
endif
|
||||
CFLAGS += -DHAVE_FILELENGTH -D__forceinline=inline -Izlib -IFLAC `sdl-config --cflags`
|
||||
CFLAGS += -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNEED_STRUPR
|
||||
|
@ -38,7 +42,11 @@ ZDOOMDEBUG = zdoomd
|
|||
ifndef DEBUG
|
||||
OBJDIR = $(RELEASEOBJ)
|
||||
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)
|
||||
else
|
||||
OBJDIR = $(DEBUGOBJ)
|
||||
|
|
|
@ -4,11 +4,12 @@ ifeq (Windows_NT,$(OS))
|
|||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
else
|
||||
EXE = dehsupp
|
||||
CCDV =
|
||||
CCDV =
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
LDFLAGS = -s
|
||||
|
||||
RE2C = ../re2c/re2c
|
||||
LEMON = ../lemon/lemon
|
||||
|
@ -20,7 +21,7 @@ OBJS = dehsupp.o parse.o scanner.o
|
|||
all: $(EXE)
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
$(CCDV) $(CC) -o $(EXE) $(OBJS)
|
||||
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||
|
||||
.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
|
||||
CCDV = @../../ccdv
|
||||
CFLAGS = -Os -Wall -fomit-frame-pointer
|
||||
LDFLAGS = -L../../zlib/ -lz
|
||||
LDFLAGS = -s -L../../zlib/ -lz
|
||||
ZLIB = ../../zlib/libz.a
|
||||
else
|
||||
EXE = makewad
|
||||
CCDV =
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Os -Wall -fomit-frame-pointer
|
||||
LDFLAGS = -lz
|
||||
LDFLAGS = -s -lz
|
||||
ZLIB =
|
||||
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++
|
||||
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
|
||||
|
||||
|
@ -12,13 +19,18 @@ all: $(EXE)
|
|||
$(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
$(CCDV) $(CXX) -s -o $(EXE) $(OBJS)
|
||||
$(CCDV) $(CXX) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||
|
||||
.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
|
||||
|
||||
actions.o: actions.cc
|
||||
code.o: code.cc
|
|
@ -4,11 +4,12 @@ ifeq (Windows_NT,$(OS))
|
|||
CFLAGS = $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
else
|
||||
EXE = xlatcc
|
||||
CCDV =
|
||||
CCDV =
|
||||
CFLAGS = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp $(LOC) -Os -Wall -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
LDFLAGS= -s
|
||||
|
||||
BISON = bison
|
||||
BISONFLAGS =
|
||||
|
@ -18,7 +19,7 @@ OBJS = gen.o xlat-parse.tab.o
|
|||
all: $(EXE)
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
$(CCDV) $(CC) -o $(EXE) $(OBJS)
|
||||
$(CCDV) $(CC) $(LDFLAGS) -o $(EXE) $(OBJS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
|
Loading…
Reference in a new issue