📄 makefile
字号:
#############################################################################
#
# $Id: makefile,v 1.56 2001/05/05 20:34:08 hurdler Exp $
# GNU Make makefile for DOS/LINUX version
# of Doom LEGACY (legacy@newdoom.com)
#
# Copyright (C) 1998-2000 by DooM Legacy Team.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# $Log: makefile,v $
# Revision 1.56 2001/05/05 20:34:08 hurdler
# restore old value again
#
# Revision 1.55 2001/05/03 21:22:25 hurdler
# remove some warnings
#
# Revision 1.53 2001/04/29 14:25:26 hurdler
# small fix
#
# Revision 1.52 2001/04/13 10:24:49 metzgermeister
# compile sndserver and musserver
#
# Revision 1.51 2001/04/01 17:35:06 bpereira
# no message
#
# Revision 1.50 2001/03/30 17:12:50 bpereira
# no message
#
# Revision 1.49 2001/03/25 18:11:23 metzgermeister
# * SDL sound bug with swapped stereo channels fixed
# * separate hw_trick.c now for HW_correctSWTrick(.)
#
# Revision 1.48 2001/03/19 21:18:48 metzgermeister
# * missing textures in HW mode are replaced by default texture
# * fixed crash bug with P_SpawnMissile(.) returning NULL
# * deep water trick and other nasty thing work now in HW mode (tested with tnt/map02 eternal/map02)
# * added cvar gr_correcttricks
#
# Revision 1.47 2001/03/13 22:14:19 stroggonmeth
# Long time no commit. 3D floors, FraggleScript, portals, ect.
#
# Revision 1.46 2001/03/09 21:53:55 metzgermeister
# *** empty log message ***
#
# Revision 1.44 2001/02/13 20:37:27 metzgermeister
# *** empty log message ***
#
# Revision 1.43 2001/02/10 15:24:19 hurdler
# Apply Rob's patch for Linux version
#
# Revision 1.42 2001/01/25 22:15:43 bpereira
# added heretic support
#
# Revision 1.41 2000/11/21 21:13:17 stroggonmeth
# Optimised 3D floors and fixed crashing bug in high resolutions.
#
# Revision 1.40 2000/11/09 17:56:20 stroggonmeth
# Hopefully fixed a few bugs and did a few optimizations.
#
# Revision 1.39 2000/11/06 20:52:15 bpereira
# no message
#
# Revision 1.38 2000/11/03 03:27:17 stroggonmeth
# Again with the bug fixing...
#
# Revision 1.37 2000/11/02 21:54:26 bpereira
# no message
#
# Revision 1.36 2000/11/02 19:49:35 bpereira
# no message
#
# Revision 1.35 2000/11/02 17:50:07 stroggonmeth
# Big 3Dfloors & FraggleScript commit!!
#
# Revision 1.34 2000/10/21 23:21:56 hurdler
# Minor updates
#
# Revision 1.33 2000/10/07 12:45:59 crashrl
# added -fwritable-strings to linux CFLAGS to fix teamplay activation segfault
#
# Revision 1.32 2000/10/01 10:23:59 bpereira
# no message
#
# Revision 1.31 2000/10/01 10:18:17 bpereira
# no message
#
# Revision 1.30 2000/09/28 20:57:15 bpereira
# no message
#
# Revision 1.29 2000/09/10 10:44:42 metzgermeister
# resolved SDL messup
#
# Revision 1.28 2000/08/31 14:30:55 bpereira
# no message
#
# Revision 1.27 2000/08/10 19:58:04 bpereira
# no message
#
# Revision 1.26 2000/08/10 14:57:26 ydario
# OS/2 port
#
# Revision 1.25 2000/08/03 17:57:42 bpereira
# no message
#
# Revision 1.24 2000/07/01 09:23:49 bpereira
# no message
#
# Revision 1.23 2000/05/07 08:27:57 metzgermeister
# no message
#
# Revision 1.20 2000/04/25 19:53:12 metzgermeister
# fixed the old tabs and spaces problem
#
# Revision 1.19 2000/04/24 20:24:38 bpereira
# no message
#
# Revision 1.18 2000/04/22 20:26:01 metzgermeister
# commandline compile options
#
# Revision 1.17 2000/04/21 08:23:47 emanne
# To have SDL working.
# Makefile: made the hiding by "@" optional. See the CC variable at
# the begining. Sorry, but I like to see what's going on while building
#
# qmus2mid.h: force include of qmus2mid_sdl.h when needed.
# s_sound.c: ??!
# s_sound.h: with it.
# (sorry for s_sound.* : I had problems with cvs...)
#
# Revision 1.16 2000/04/18 14:50:36 hurdler
# no message
#
# Revision 1.15 2000/04/16 18:38:07 bpereira
# no message
#
# Revision 1.14 2000/04/13 23:47:47 stroggonmeth
# See logs
#
# Revision 1.13 2000/04/12 19:32:04 metzgermeister
# added support for commandline OS switch
#
# Revision 1.12 2000/04/11 19:07:23 stroggonmeth
# Finished my logs, fixed a crashing bug.
#
# Revision 1.11 2000/04/09 02:30:57 stroggonmeth
# Fixed missing sprite def :\
#
# Revision 1.10 2000/04/08 17:29:24 stroggonmeth
# no message
#
# Revision 1.9 2000/04/07 23:10:15 metzgermeister
# fullscreen support under X in Linux
#
# Revision 1.8 2000/04/04 19:28:42 stroggonmeth
# Global colormaps working. Added a new linedef type 272.
#
# Revision 1.7 2000/04/04 00:32:46 stroggonmeth
# Initial Boom compatability plus few misc changes all around.
#
# Revision 1.6 2000/03/29 19:39:48 bpereira
# no message
#
# Revision 1.5 2000/03/07 03:32:24 hurdler
# fix linux compilation
#
# Revision 1.4 2000/03/05 17:17:03 bpereira
# no message
#
# Revision 1.3 2000/03/04 23:27:08 hurdler
# fix "missing operator" problem
#
# Revision 1.2 2000/02/27 00:42:10 hurdler
# fix CR+LF problem
#
# Revision 1.1.1.1 2000/02/22 20:32:32 hurdler
# Initial import into CVS (v1.29 pr3)
#
#
# -DUSEASM -> use assembly routines instead of C ones, where possible.
# -DPC_DOS -> use dos specific code (eg:textmode stuff)...
# -DLINUX -> use for the linux specific
# -D__OS2__ -> use for the OS/2 specific
#
# Compile the Linux version with 'make LINUX=1'
# Compile the OS/2 version with 'make OS2=1'
# Compile a debug/profile version with 'make LINUX=1 PROFILEMODE=1'
# Compile the SDL version with 'make LINUX=1 HAVE_MIXER=1'
#
#############################################################################
# gcc or g++
#CC=@gcc
CC=gcc
#if use PGCC or EGCS
PGCC=1
WFLAGS=-Wall # -W -Wno-unused -Wno-sign-compare
#indicate platform and what interface use with
ifndef OS2
ifndef LINUX
ifndef SDL
DJGPPDOS=1
endif
endif
endif
#determine the interface directory (where you put all i_*.c)
ifdef DJGPPDOS
INTERFACE=DJGPPDOS
NASMFORMAT=coff
else
ifdef LINUX
INTERFACE=linux_x
NASMFORMAT=elf -DLINUX
endif
ifdef OS2
INTERFACE=os2
NASMFORMAT=coff
endif
ifdef SDL
INTERFACE=sdl
endif
endif
ifdef DJGPPDOS
# subdirectory for objects
O=objs
BIN=bin
#use the x86 asm code
#USEASM=1
# options
OPTS=-DPC_DOS -g
DEBUGLIBS=-lalleg -lbcd -lsocket
LIBS=-lalleg -lbcd -lsocket
SFLAGS=
CFLAGS=-g
OBJS=$(O)/i_video.o $(O)/vid_vesa.o
# name of the exefile
EXENAME=DOOM3.exe
endif #ifdef DJGPPDOS
ifdef LINUX
# subdirectory for objects
O=../objs
BIN=../bin
MUSSERV=linux_x/musserv
SNDSERV=linux_x/sndserv
#use the x86 asm code
USEASM=1
OPTS=-DLINUX -DOLD_SOUND_DRIVER -DMUSSERV -DSNDSERV -DHWRENDER -DDIRECTFULLSCREEN
X=1
ifdef X
OPTS := $(OPTS) -DVID_X11 -DPOLL_POINTER -I. -I/usr/X11R6/include
LDFLAGS=-L/usr/X11R6/lib
LIBS=-lXext -lX11 -lm -ldl -lXxf86vm
# name of the exefile
EXENAME=llxdoom
SFLAGS=-g $(OPTS)
OBJS=$(O)/i_video_xshm.o $(O)/dosstr.o $(O)/searchp.o $(O)/endtxt.o \
$(O)/hw_bsp.o $(O)/hw_draw.o $(O)/hw_light.o $(O)/hw_main.o \
$(O)/hw_md2.o $(O)/hw_cache.o $(O)/hw_trick.o
else
OPTS := $(OPTS) -DVID_GGI -I.
LDFLAGS=
LIBS=-lggi -lm
# name of the exefile
EXENAME=llggidoom
SFLAGS=-g $(OPTS)
OBJS=$(O)/i_video_ggi.o $(O)/dosstr.o $(O)/searchp.o $(O)/endtxt.o \
$(O)/hw_bsp.o $(O)/hw_draw.o $(O)/hw_light.o $(O)/hw_main.o \
$(O)/hw_md2.o $(O)/hw_cache.o $(O)/hw_trick.o
endif
endif
ifdef SDL
# subdirectory for objects
O=../objs
BIN=../bin
OPTS := $(OPTS) -I.
SFLAGS=-g $(OPTS)
OBJS=$(O)/i_video.o $(O)/dosstr.o $(O)/searchp.o $(O)/endtxt.o \
$(O)/hw_bsp.o $(O)/hw_draw.o $(O)/hw_light.o $(O)/hw_main.o \
$(O)/hw_md2.o $(O)/hw_cache.o $(O)/hw_trick.o \
$(O)/r_opengl.o $(O)/ogl_sdl.o $(O)/hwsym_sdl.o
DEBUGLIBS=$(LIBS)
OPTS := -DLINUX -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 -DPOLL_POINTER -I. -I/usr/local/include/SDL -I/usr/X11R6/include -Wall
LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
LIBS=-lm -lSDL -lSDL_mixer -lpthread -lGL -lGLU
DEBUGLIBS=$(LIBS)
# name of the exefile
EXENAME=lsdldoom
endif
ifdef OS2
# subdirectory for objects
O=objs
BIN=bin
#use the x86 asm code
NASM=nasm
USEASM=1
PROFILEMODE=1
# options
OPTS=-Zmt -D__OS2__ -I.. -I. -Ios2
DEBUGLIBS=-lmmpm2 -lsocket -g
LIBS= $(INTERFACE)/I_pm.def -lmmpm2 -lsocket -g
SFLAGS=-g $(OPTS)
OBJS=$(O)/i_video.o $(O)/i_dart.o $(O)/i_dive.o $(O)/I_pm.o \
$(O)/printf.o $(O)/I_pm.res
# name of the exefile
EXENAME=Doom2.exe
endif
ifdef USEASM
OBJS:= $(OBJS) $(O)/tmap.o $(O)/vid_copy.o
OPTS:= $(OPTS) -DUSEASM
endif
ifdef PROFILEMODE
# build with profiling information
ifdef PGCC
CFLAGS = -g -pg -DPARANOIA -fwritable-strings $(OPTS)
else
CFLAGS = -g -pg -m486 -O3 -ffast-math -fwritable-strings $(OPTS)
endif
LDFLAGS = -g -pg -L/usr/X11R6/lib
else
# build a normal optimised version
ifdef PGCC
CFLAGS = $(OPTS) -mpentium -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
# -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
# -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps \
# -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
# -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
else
CFLAGS = -m486 -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -