2018-07-20 21:35:18 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
# GNU Make makefile for SRB2
|
|
|
|
#############################################################################
|
|
|
|
# Copyright (C) 1998-2000 by DooM Legacy Team.
|
2021-02-18 13:16:15 +00:00
|
|
|
# Copyright (C) 2003-2021 by Sonic Team Junior.
|
2014-03-15 16:59:03 +00:00
|
|
|
#
|
|
|
|
# This program is free software distributed under the
|
|
|
|
# terms of the GNU General Public License, version 2.
|
|
|
|
# See the 'LICENSE' file for more details.
|
|
|
|
#
|
|
|
|
# -DLINUX -> use for the GNU/Linux specific
|
|
|
|
# -D_WINDOWS -> use for the Win32/DirectX specific
|
2014-07-25 23:10:24 +00:00
|
|
|
# -DHAVE_SDL -> use for the SDL interface
|
2014-03-15 16:59:03 +00:00
|
|
|
#
|
|
|
|
# Sets:
|
2020-11-21 23:19:54 +00:00
|
|
|
# Compile the SDL/Mingw version with 'make MINGW=1'
|
2014-03-15 16:59:03 +00:00
|
|
|
# Compile the SDL/Linux version with 'make LINUX=1'
|
|
|
|
# Compile the SDL/Solaris version with 'make SOLARIS=1'
|
|
|
|
# Compile the SDL/FreeBSD version with 'gmake FREEBSD=1'
|
|
|
|
# Compile the SDL/Cygwin version with 'make CYGWIN32=1'
|
|
|
|
# Compile the SDL/other version try with 'make SDL=1'
|
|
|
|
#
|
|
|
|
# 'Targets':
|
|
|
|
# clean
|
|
|
|
# Remove all object files
|
|
|
|
# cleandep
|
2021-02-18 14:15:11 +00:00
|
|
|
# Remove dependency files
|
|
|
|
# distclean
|
|
|
|
# Remove autogenerated files
|
2014-03-15 16:59:03 +00:00
|
|
|
# dll
|
|
|
|
# compile primary HW render DLL/SO
|
|
|
|
# all_dll
|
|
|
|
# compile all HW render and 3D sound DLLs for the set
|
|
|
|
# opengl_dll
|
|
|
|
# Pure Mingw only, compile OpenGL HW render DLL
|
|
|
|
# ds3d_dll
|
|
|
|
# Pure Mingw only, compile DirectX DirectSound HW sound DLL
|
|
|
|
# fmod_dll
|
|
|
|
# Pure Mingw only, compile FMOD HW sound DLL
|
|
|
|
# openal_dll
|
|
|
|
# Pure Mingw only, compile OpenAL HW sound DLL
|
|
|
|
# fmod_so
|
|
|
|
# Non-Mingw, compile FMOD HW sound SO
|
|
|
|
# openal_so
|
|
|
|
# Non-Mingw, compile OpenAL HW sound SO
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Addon:
|
|
|
|
# To Cross-Compile, CC=gcc-version make * PREFIX=<dir>
|
|
|
|
# Compile with GCC 2.97 version, add 'GCC29=1'
|
|
|
|
# Compile with GCC 4.0x version, add 'GCC40=1'
|
|
|
|
# Compile with GCC 4.1x version, add 'GCC41=1'
|
|
|
|
# Compile with GCC 4.2x version, add 'GCC42=1'
|
|
|
|
# Compile with GCC 4.3x version, add 'GCC43=1'
|
|
|
|
# Compile with GCC 4.4x version, add 'GCC44=1'
|
|
|
|
# Compile with GCC 4.5x version, add 'GCC45=1'
|
|
|
|
# Compile with GCC 4.6x version, add 'GCC46=1'
|
|
|
|
# Compile a profile version, add 'PROFILEMODE=1'
|
|
|
|
# Compile a debug version, add 'DEBUGMODE=1'
|
2020-08-18 23:45:00 +00:00
|
|
|
# Compile with less warnings, add 'RELAXWARNINGS=1'
|
|
|
|
# Generate compiler errors for most compiler warnings, add 'ERRORMODE=1'
|
2014-03-15 16:59:03 +00:00
|
|
|
# Compile without NASM's tmap.nas, add 'NOASM=1'
|
|
|
|
# Compile without 3D hardware support, add 'NOHW=1'
|
|
|
|
# Compile with GDBstubs, add 'RDB=1'
|
|
|
|
# Compile without PNG, add 'NOPNG=1'
|
2018-10-04 23:47:19 +00:00
|
|
|
# Compile without zlib, add 'NOZLIB=1'
|
2014-03-15 16:59:03 +00:00
|
|
|
#
|
|
|
|
# Addon for SDL:
|
|
|
|
# To Cross-Compile, add 'SDL_CONFIG=/usr/*/bin/sdl-config'
|
|
|
|
# Compile without SDL_Mixer, add 'NOMIXER=1'
|
2019-08-04 11:03:57 +00:00
|
|
|
# Compile without SDL_Mixer_X, add 'NOMIXERX=1' (Win32 only)
|
|
|
|
# Compile without GME, add 'NOGME=1'
|
2014-03-15 16:59:03 +00:00
|
|
|
# Compile without BSD API, add 'NONET=1'
|
|
|
|
# Compile without IPX/SPX, add 'NOIPX=1'
|
|
|
|
# Compile Mingw/SDL with S_DS3S, add 'DS3D=1'
|
2019-01-04 06:48:04 +00:00
|
|
|
# Compile without libopenmpt, add 'NOOPENMPT=1'
|
2014-03-15 16:59:03 +00:00
|
|
|
# Compile with S_FMOD3D, add 'FMOD=1' (WIP)
|
|
|
|
# Compile with S_OPENAL, add 'OPENAL=1' (WIP)
|
|
|
|
# To link with the whole SDL_Image lib to load Icons, add 'SDL_IMAGE=1' but it isn't not realy needed
|
|
|
|
# To link with SDLMain to hide console or make on a console-less binary, add 'SDLMAIN=1'
|
|
|
|
#
|
|
|
|
#############################################################################
|
|
|
|
|
2021-02-18 15:03:25 +00:00
|
|
|
,=,
|
|
|
|
|
|
|
|
ifeq (,$(filter-out cleandep clean distclean,$(or $(MAKECMDGOALS),all)))
|
|
|
|
CLEANONLY=1
|
|
|
|
else ifndef SILENT
|
|
|
|
echo=@echo "$(1)"
|
2021-02-18 13:16:15 +00:00
|
|
|
ifndef MAKE_RESTARTS
|
|
|
|
print=$(info $(1))
|
|
|
|
endif
|
2021-02-18 15:03:25 +00:00
|
|
|
endif
|
2021-02-18 13:16:15 +00:00
|
|
|
|
2020-08-19 01:01:59 +00:00
|
|
|
ALL_SYSTEMS=\
|
|
|
|
PANDORA\
|
|
|
|
LINUX64\
|
|
|
|
MINGW64\
|
|
|
|
HAIKU\
|
|
|
|
DUMMY\
|
|
|
|
DJGPPDOS\
|
|
|
|
MINGW\
|
|
|
|
UNIX\
|
|
|
|
LINUX\
|
|
|
|
SOLARIS\
|
|
|
|
FREEBSD\
|
|
|
|
MACOSX\
|
|
|
|
SDL\
|
|
|
|
|
|
|
|
# check for user specified system
|
|
|
|
ifeq (,$(filter $(ALL_SYSTEMS),$(.VARIABLES)))
|
|
|
|
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
|
|
|
|
2021-02-18 15:03:25 +00:00
|
|
|
$(call print,Detected a Windows system$(,) compiling for 32-bit MinGW SDL2...)
|
2020-08-19 01:01:59 +00:00
|
|
|
|
|
|
|
# go for a 32-bit sdl mingw exe by default
|
|
|
|
MINGW=1
|
2020-08-21 03:19:50 +00:00
|
|
|
WINDOWSHELL=1
|
2020-08-19 01:01:59 +00:00
|
|
|
|
|
|
|
else # if you on the *nix
|
|
|
|
|
|
|
|
system:=$(shell uname -s)
|
|
|
|
|
|
|
|
ifeq ($(system),Linux)
|
|
|
|
new_system=LINUX
|
|
|
|
else
|
|
|
|
|
|
|
|
$(error \
|
|
|
|
Could not automatically detect your system,\
|
|
|
|
try specifying a system manually)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(shell getconf LONG_BIT),64)
|
|
|
|
system+=64-bit
|
|
|
|
new_system:=$(new_system)64
|
|
|
|
endif
|
|
|
|
|
2021-02-18 13:16:15 +00:00
|
|
|
$(call print,Detected $(system) ($(new_system))...)
|
2020-08-19 01:01:59 +00:00
|
|
|
$(new_system)=1
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
# SRB2 data files
|
|
|
|
D_DIR?=../bin/Resources
|
2017-12-07 18:26:12 +00:00
|
|
|
D_FILES=$(D_DIR)/srb2.pk3 \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(D_DIR)/player.dta \
|
2019-09-29 03:31:50 +00:00
|
|
|
$(D_DIR)/zones.pk3 \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(D_DIR)/music.dta \
|
|
|
|
|
|
|
|
PKG_CONFIG?=pkg-config
|
|
|
|
|
|
|
|
ifdef PANDORA
|
|
|
|
LINUX=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef LINUX64
|
|
|
|
LINUX=1
|
|
|
|
NONX86=1
|
2018-12-30 02:14:50 +00:00
|
|
|
# LINUX64 does not imply X86_64=1; could mean ARM64 or Itanium
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
2018-12-30 02:14:50 +00:00
|
|
|
ifdef MINGW64
|
|
|
|
MINGW=1
|
|
|
|
NONX86=1
|
|
|
|
NOASM=1
|
|
|
|
# MINGW64 should not necessarily imply X86_64=1, but we make that assumption elsewhere
|
|
|
|
# Once that changes, remove this
|
|
|
|
X86_64=1
|
|
|
|
endif #ifdef MINGW64
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef HAIKU
|
|
|
|
SDL=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
include Makefile.cfg
|
|
|
|
|
|
|
|
ifdef DUMMY
|
|
|
|
NOPNG=1
|
2018-10-04 23:47:19 +00:00
|
|
|
NOZLIB=1
|
2014-03-15 16:59:03 +00:00
|
|
|
NONET=1
|
|
|
|
NOHW=1
|
|
|
|
NOASM=1
|
|
|
|
NOIPX=1
|
|
|
|
EXENAME?=srb2dummy
|
|
|
|
OBJS=$(OBJDIR)/i_video.o
|
|
|
|
LIBS=-lm
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HAIKU
|
|
|
|
NOIPX=1
|
|
|
|
NOASM=1
|
|
|
|
ifndef NONET
|
|
|
|
LIBS=-lnetwork
|
|
|
|
endif
|
|
|
|
CFLAGS+=-DUNIXCOMMON
|
|
|
|
PNG_CFLAGS?=
|
|
|
|
PNG_LDFLAGS?=-lpng
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PANDORA
|
|
|
|
NONX86=1
|
|
|
|
NOHW=1
|
|
|
|
endif
|
|
|
|
|
2019-01-02 07:37:48 +00:00
|
|
|
ifndef NOOPENMPT
|
|
|
|
HAVE_OPENMPT=1
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef MINGW
|
|
|
|
include win32/Makefile.cfg
|
|
|
|
endif #ifdef MINGW
|
|
|
|
|
|
|
|
ifdef UNIX
|
|
|
|
UNIXCOMMON=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef LINUX
|
|
|
|
UNIXCOMMON=1
|
2016-09-09 21:41:30 +00:00
|
|
|
ifndef NOGME
|
|
|
|
HAVE_LIBGME=1
|
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SOLARIS
|
|
|
|
UNIXCOMMON=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef FREEBSD
|
|
|
|
UNIXCOMMON=1
|
|
|
|
endif
|
|
|
|
|
2016-05-19 00:14:53 +00:00
|
|
|
ifdef MACOSX
|
|
|
|
UNIXCOMMON=1
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef SDL
|
2017-09-14 20:03:20 +00:00
|
|
|
include sdl/Makefile.cfg
|
2014-03-15 16:59:03 +00:00
|
|
|
endif #ifdef SDL
|
|
|
|
|
|
|
|
ifdef DISTCC
|
|
|
|
CC:=distcc $(CC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CCACHE
|
|
|
|
CC:=ccache $(CC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
MSGFMT?=msgfmt
|
|
|
|
|
2021-02-18 15:03:25 +00:00
|
|
|
ifdef WINDOWSHELL
|
|
|
|
COMPTIME=-..\comptime.bat
|
|
|
|
else
|
|
|
|
COMPTIME=-../comptime.sh
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifndef ECHO
|
|
|
|
NASM:=@$(NASM)
|
|
|
|
REMOVE:=@$(REMOVE)
|
|
|
|
CC:=@$(CC)
|
|
|
|
CXX:=@$(CXX)
|
|
|
|
OBJCOPY:=@$(OBJCOPY)
|
|
|
|
OBJDUMP:=@$(OBJDUMP)
|
|
|
|
STRIP:=@$(STRIP)
|
|
|
|
WINDRES:=@$(WINDRES)
|
|
|
|
MKDIR:=@$(MKDIR)
|
|
|
|
GZIP:=@$(GZIP)
|
|
|
|
MSGFMT:=@$(MSGFMT)
|
|
|
|
UPX:=@$(UPX)
|
|
|
|
UPX_OPTS+=-q
|
2021-02-18 15:03:25 +00:00
|
|
|
COMPTIME:=@$(COMPTIME)
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NONET
|
|
|
|
OPTS+=-DNONET
|
2020-04-07 05:48:43 +00:00
|
|
|
NOCURL=1
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
|
|
|
ifdef NO_IPV6
|
|
|
|
OPTS+=-DNO_IPV6
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NOHW
|
|
|
|
OPTS+=-DNOHW
|
|
|
|
else
|
|
|
|
OPTS+=-DHWRENDER
|
|
|
|
OBJS+=$(OBJDIR)/hw_bsp.o $(OBJDIR)/hw_draw.o $(OBJDIR)/hw_light.o \
|
2020-07-06 04:26:56 +00:00
|
|
|
$(OBJDIR)/hw_main.o $(OBJDIR)/hw_clip.o $(OBJDIR)/hw_md2.o $(OBJDIR)/hw_cache.o \
|
2020-06-07 18:20:52 +00:00
|
|
|
$(OBJDIR)/hw_md2load.o $(OBJDIR)/hw_md3load.o $(OBJDIR)/hw_model.o $(OBJDIR)/u_list.o $(OBJDIR)/hw_batching.o
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
OPTS += -DCOMPVERSION
|
|
|
|
|
|
|
|
ifndef NONX86
|
|
|
|
ifndef GCC29
|
2020-10-24 17:52:54 +00:00
|
|
|
ARCHOPTS?=-msse3 -mfpmath=sse
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
2018-12-30 02:55:13 +00:00
|
|
|
ARCHOPTS?=-mpentium
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
else
|
2018-12-28 00:00:18 +00:00
|
|
|
ifdef X86_64
|
2018-12-30 02:55:13 +00:00
|
|
|
ARCHOPTS?=-march=nocona
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOASM
|
|
|
|
ifndef NONX86
|
|
|
|
OBJS+=$(OBJDIR)/tmap.o $(OBJDIR)/tmap_mmx.o
|
|
|
|
OPTS+=-DUSEASM
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOPNG
|
|
|
|
OPTS+=-DHAVE_PNG
|
|
|
|
|
|
|
|
ifdef PNG_PKGCONFIG
|
|
|
|
PNG_CFLAGS?=$(shell $(PKG_CONFIG) $(PNG_PKGCONFIG) --cflags)
|
|
|
|
PNG_LDFLAGS?=$(shell $(PKG_CONFIG) $(PNG_PKGCONFIG) --libs)
|
|
|
|
else
|
|
|
|
ifdef PREFIX
|
|
|
|
PNG_CONFIG?=$(PREFIX)-libpng-config
|
|
|
|
else
|
|
|
|
PNG_CONFIG?=libpng-config
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PNG_STATIC
|
|
|
|
PNG_CFLAGS?=$(shell $(PNG_CONFIG) --static --cflags)
|
|
|
|
PNG_LDFLAGS?=$(shell $(PNG_CONFIG) --static --ldflags)
|
|
|
|
else
|
|
|
|
PNG_CFLAGS?=$(shell $(PNG_CONFIG) --cflags)
|
|
|
|
PNG_LDFLAGS?=$(shell $(PNG_CONFIG) --ldflags)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-01-10 22:35:36 +00:00
|
|
|
ifdef LINUX
|
|
|
|
PNG_CFLAGS+=-D_LARGEFILE64_SOURCE
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
LIBS+=$(PNG_LDFLAGS)
|
|
|
|
CFLAGS+=$(PNG_CFLAGS)
|
2019-02-16 11:18:22 +00:00
|
|
|
|
|
|
|
OBJS+=$(OBJDIR)/apng.o
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HAVE_LIBGME
|
|
|
|
OPTS+=-DHAVE_LIBGME
|
|
|
|
|
|
|
|
LIBGME_PKGCONFIG?=libgme
|
|
|
|
LIBGME_CFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --cflags)
|
|
|
|
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
|
|
|
|
|
|
|
|
LIBS+=$(LIBGME_LDFLAGS)
|
|
|
|
CFLAGS+=$(LIBGME_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
2018-09-18 16:31:47 +00:00
|
|
|
ifdef HAVE_OPENMPT
|
2019-01-04 01:52:09 +00:00
|
|
|
OPTS+=-DHAVE_OPENMPT
|
2018-09-18 16:31:47 +00:00
|
|
|
|
|
|
|
LIBOPENMPT_PKGCONFIG?=libopenmpt
|
|
|
|
LIBOPENMPT_CFLAGS?=$(shell $(PKG_CONFIG) $(LIBOPENMPT_PKGCONFIG) --cflags)
|
|
|
|
LIBOPENMPT_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBOPENMPT_PKGCONFIG) --libs)
|
|
|
|
|
|
|
|
LIBS+=$(LIBOPENMPT_LDFLAGS)
|
|
|
|
CFLAGS+=$(LIBOPENMPT_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
2018-10-04 23:47:19 +00:00
|
|
|
ifndef NOZLIB
|
|
|
|
OPTS+=-DHAVE_ZLIB
|
|
|
|
ZLIB_PKGCONFIG?=zlib
|
|
|
|
ZLIB_CFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --cflags)
|
|
|
|
ZLIB_LDFLAGS?=$(shell $(PKG_CONFIG) $(ZLIB_PKGCONFIG) --libs)
|
|
|
|
|
|
|
|
LIBS+=$(ZLIB_LDFLAGS)
|
|
|
|
CFLAGS+=$(ZLIB_CFLAGS)
|
|
|
|
else
|
|
|
|
NOPNG=1
|
|
|
|
endif
|
|
|
|
|
2020-04-07 05:48:43 +00:00
|
|
|
ifndef NOCURL
|
|
|
|
OPTS+=-DHAVE_CURL
|
|
|
|
CURLCONFIG?=curl-config
|
|
|
|
CURL_CFLAGS?=$(shell $(CURLCONFIG) --cflags)
|
|
|
|
CURL_LDFLAGS?=$(shell $(CURLCONFIG) --libs)
|
|
|
|
|
|
|
|
LIBS+=$(CURL_LDFLAGS)
|
|
|
|
CFLAGS+=$(CURL_CFLAGS)
|
|
|
|
endif
|
2020-03-01 10:36:56 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef STATIC
|
|
|
|
LIBS:=-static $(LIBS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HAVE_MINIUPNPC
|
|
|
|
ifdef NONET
|
|
|
|
HAVE_MINIUPNPC=''
|
|
|
|
else
|
|
|
|
LIBS+=-lminiupnpc
|
|
|
|
ifdef MINGW
|
|
|
|
LIBS+=-lws2_32 -liphlpapi
|
|
|
|
endif
|
|
|
|
CFLAGS+=-DHAVE_MINIUPNPC
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-03-19 17:36:14 +00:00
|
|
|
include blua/Makefile.cfg
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifdef NOMD5
|
|
|
|
OPTS+=-DNOMD5
|
|
|
|
else
|
|
|
|
OBJS:=$(OBJDIR)/md5.o $(OBJS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NOPOSTPROCESSING
|
|
|
|
OPTS+=-DNOPOSTPROCESSING
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPTS:=-fno-exceptions $(OPTS)
|
|
|
|
|
2017-01-01 22:07:34 +00:00
|
|
|
ifdef MOBJCONSISTANCY
|
|
|
|
OPTS+=-DMOBJCONSISTANCY
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PACKETDROP
|
|
|
|
OPTS+=-DPACKETDROP
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef DEBUGMODE
|
|
|
|
|
|
|
|
# build with debugging information
|
|
|
|
WINDRESFLAGS = -D_DEBUG
|
2016-05-27 18:14:04 +00:00
|
|
|
ifdef GCC48
|
|
|
|
CFLAGS+=-Og
|
|
|
|
else
|
|
|
|
CFLAGS+=-O0
|
|
|
|
endif
|
2021-02-16 20:36:28 +00:00
|
|
|
CFLAGS+= -Wall -DPARANOIA -DRANGECHECK -DPACKETDROP
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
# build a normal optimised version
|
|
|
|
WINDRESFLAGS = -DNDEBUG
|
2016-05-27 00:39:15 +00:00
|
|
|
CFLAGS+=-O3
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
2018-12-30 02:55:13 +00:00
|
|
|
CFLAGS+=-g $(OPTS) $(ARCHOPTS) $(WINDRESFLAGS)
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifdef YASM
|
|
|
|
ifdef STABS
|
|
|
|
NASMOPTS?= -g stabs
|
|
|
|
else
|
|
|
|
NASMOPTS?= -g dwarf2
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
NASMOPTS?= -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PROFILEMODE
|
|
|
|
# build with profiling information
|
2018-07-20 21:35:18 +00:00
|
|
|
CFLAGS+=-pg
|
|
|
|
LDFLAGS+=-pg
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef ZDEBUG
|
|
|
|
CPPFLAGS+=-DZDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPTS+=$(CPPFLAGS)
|
|
|
|
|
|
|
|
# default EXENAME if all else fails
|
|
|
|
EXENAME?=srb2
|
|
|
|
DBGNAME?=$(EXENAME).debug
|
|
|
|
|
|
|
|
# $(OBJDIR)/dstrings.o \
|
|
|
|
|
|
|
|
# not too sophisticated dependency
|
|
|
|
OBJS:=$(i_main_o) \
|
|
|
|
$(OBJDIR)/string.o \
|
|
|
|
$(OBJDIR)/d_main.o \
|
|
|
|
$(OBJDIR)/d_clisrv.o \
|
|
|
|
$(OBJDIR)/d_net.o \
|
|
|
|
$(OBJDIR)/d_netfil.o \
|
|
|
|
$(OBJDIR)/d_netcmd.o \
|
|
|
|
$(OBJDIR)/dehacked.o \
|
2020-10-29 05:48:29 +00:00
|
|
|
$(OBJDIR)/deh_soc.o \
|
|
|
|
$(OBJDIR)/deh_lua.o \
|
|
|
|
$(OBJDIR)/deh_tables.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/z_zone.o \
|
|
|
|
$(OBJDIR)/f_finale.o \
|
|
|
|
$(OBJDIR)/f_wipe.o \
|
2020-03-19 20:13:39 +00:00
|
|
|
$(OBJDIR)/g_demo.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/g_game.o \
|
|
|
|
$(OBJDIR)/g_input.o \
|
|
|
|
$(OBJDIR)/am_map.o \
|
|
|
|
$(OBJDIR)/command.o \
|
|
|
|
$(OBJDIR)/console.o \
|
|
|
|
$(OBJDIR)/hu_stuff.o \
|
|
|
|
$(OBJDIR)/y_inter.o \
|
|
|
|
$(OBJDIR)/st_stuff.o \
|
2016-06-05 20:29:40 +00:00
|
|
|
$(OBJDIR)/m_aatree.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/m_anigif.o \
|
|
|
|
$(OBJDIR)/m_argv.o \
|
|
|
|
$(OBJDIR)/m_bbox.o \
|
|
|
|
$(OBJDIR)/m_cheat.o \
|
|
|
|
$(OBJDIR)/m_cond.o \
|
|
|
|
$(OBJDIR)/m_fixed.o \
|
|
|
|
$(OBJDIR)/m_menu.o \
|
|
|
|
$(OBJDIR)/m_misc.o \
|
2020-10-10 18:08:24 +00:00
|
|
|
$(OBJDIR)/m_perfstats.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/m_random.o \
|
|
|
|
$(OBJDIR)/m_queue.o \
|
|
|
|
$(OBJDIR)/info.o \
|
|
|
|
$(OBJDIR)/p_ceilng.o \
|
|
|
|
$(OBJDIR)/p_enemy.o \
|
|
|
|
$(OBJDIR)/p_floor.o \
|
|
|
|
$(OBJDIR)/p_inter.o \
|
|
|
|
$(OBJDIR)/p_lights.o \
|
|
|
|
$(OBJDIR)/p_map.o \
|
|
|
|
$(OBJDIR)/p_maputl.o \
|
|
|
|
$(OBJDIR)/p_mobj.o \
|
|
|
|
$(OBJDIR)/p_polyobj.o\
|
|
|
|
$(OBJDIR)/p_saveg.o \
|
|
|
|
$(OBJDIR)/p_setup.o \
|
|
|
|
$(OBJDIR)/p_sight.o \
|
|
|
|
$(OBJDIR)/p_spec.o \
|
|
|
|
$(OBJDIR)/p_telept.o \
|
|
|
|
$(OBJDIR)/p_tick.o \
|
|
|
|
$(OBJDIR)/p_user.o \
|
2014-11-19 00:45:57 +00:00
|
|
|
$(OBJDIR)/p_slopes.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/tables.o \
|
|
|
|
$(OBJDIR)/r_bsp.o \
|
|
|
|
$(OBJDIR)/r_data.o \
|
|
|
|
$(OBJDIR)/r_draw.o \
|
|
|
|
$(OBJDIR)/r_main.o \
|
|
|
|
$(OBJDIR)/r_plane.o \
|
|
|
|
$(OBJDIR)/r_segs.o \
|
2020-03-08 19:48:23 +00:00
|
|
|
$(OBJDIR)/r_skins.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/r_sky.o \
|
|
|
|
$(OBJDIR)/r_splats.o \
|
|
|
|
$(OBJDIR)/r_things.o \
|
2020-01-07 15:35:10 +00:00
|
|
|
$(OBJDIR)/r_textures.o \
|
2019-10-28 18:28:42 +00:00
|
|
|
$(OBJDIR)/r_patch.o \
|
2020-10-10 21:43:26 +00:00
|
|
|
$(OBJDIR)/r_patchrotation.o \
|
2020-01-06 21:22:23 +00:00
|
|
|
$(OBJDIR)/r_picformats.o \
|
2019-06-01 11:07:23 +00:00
|
|
|
$(OBJDIR)/r_portal.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/screen.o \
|
2020-04-12 09:56:36 +00:00
|
|
|
$(OBJDIR)/taglist.o \
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/v_video.o \
|
|
|
|
$(OBJDIR)/s_sound.o \
|
|
|
|
$(OBJDIR)/sounds.o \
|
|
|
|
$(OBJDIR)/w_wad.o \
|
|
|
|
$(OBJDIR)/filesrch.o \
|
|
|
|
$(OBJDIR)/mserv.o \
|
2020-05-15 00:24:49 +00:00
|
|
|
$(OBJDIR)/http-mserv.o\
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/i_tcp.o \
|
|
|
|
$(OBJDIR)/lzf.o \
|
|
|
|
$(OBJDIR)/vid_copy.o \
|
|
|
|
$(OBJDIR)/b_bot.o \
|
|
|
|
$(i_net_o) \
|
|
|
|
$(i_system_o) \
|
|
|
|
$(i_sound_o) \
|
|
|
|
$(OBJS)
|
|
|
|
|
2021-03-01 01:02:08 +00:00
|
|
|
DEPS:=$(patsubst $(OBJDIR)/%.o,$(DEPDIR)/%.d,$(filter %.o,$(OBJS)))
|
2021-02-18 14:15:11 +00:00
|
|
|
OBJS+=$(OBJDIR)/comptime.o
|
2020-11-19 21:17:56 +00:00
|
|
|
|
2021-02-18 15:03:25 +00:00
|
|
|
ifndef SILENT
|
2020-11-19 21:17:56 +00:00
|
|
|
ifndef ECHO
|
2020-11-22 04:21:18 +00:00
|
|
|
ifndef NOECHOFILENAMES
|
2020-11-19 21:17:56 +00:00
|
|
|
define echoName =
|
|
|
|
@echo -- $< ...
|
|
|
|
endef
|
|
|
|
endif
|
2020-11-22 04:21:18 +00:00
|
|
|
endif
|
2021-02-18 15:03:25 +00:00
|
|
|
endif
|
2020-11-19 21:17:56 +00:00
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
# List of languages to compile.
|
|
|
|
# For reference, this is the command I use to build a srb2.pot file from the source code.
|
|
|
|
# (The listed source files are the ones containing translated strings).
|
|
|
|
# FILES=""; for file in `find ./ | grep "\.c" | grep -v svn`; do [ "`grep "M_GetText(" $file`" ] && FILES="$FILES $file"; done; xgettext -d srb2 -o locale/srb2.pot -kM_GetText -F --no-wrap $FILES
|
|
|
|
ifdef GETTEXT
|
|
|
|
POS:=$(BIN)/en.mo
|
|
|
|
|
|
|
|
OPTS+=-DGETTEXT
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PANDORA
|
2021-02-18 14:15:11 +00:00
|
|
|
all: $(BIN)/$(PNDNAME)
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifdef SDL
|
2021-02-18 14:15:11 +00:00
|
|
|
all: $(BIN)/$(EXENAME)
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef DUMMY
|
|
|
|
all: $(BIN)/$(EXENAME)
|
|
|
|
endif
|
|
|
|
|
|
|
|
cleandep:
|
2021-02-18 14:15:11 +00:00
|
|
|
$(REMOVE) $(DEPS)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(REMOVE) comptime.h
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(REMOVE) *~ *.flc
|
|
|
|
$(REMOVE) $(OBJDIR)/*.o
|
|
|
|
|
2021-02-18 14:15:11 +00:00
|
|
|
distclean: clean cleandep
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef MINGW
|
|
|
|
$(REMOVE) $(OBJDIR)/*.res
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CYGWIN32
|
|
|
|
$(REMOVE) $(OBJDIR)/*.res
|
|
|
|
endif
|
|
|
|
|
|
|
|
#make a big srb2.s that is the disasm of the exe (dos only ?)
|
|
|
|
asm:
|
|
|
|
$(CC) $(LDFLAGS) $(OBJS) -o $(OBJDIR)/tmp.exe $(LIBS)
|
|
|
|
$(OBJDUMP) -d $(OBJDIR)/tmp.exe --no-show-raw-insn > srb2.s
|
|
|
|
$(REMOVE) $(OBJDIR)/tmp.exe
|
|
|
|
|
|
|
|
# executable
|
|
|
|
# NOTE: DJGPP's objcopy do not have --add-gnu-debuglink
|
|
|
|
|
|
|
|
$(BIN)/$(EXENAME): $(POS) $(OBJS)
|
|
|
|
-$(MKDIR) $(BIN)
|
2021-02-18 15:03:25 +00:00
|
|
|
$(call echo,Linking $(EXENAME)...)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS)
|
|
|
|
ifndef VALGRIND
|
|
|
|
ifndef NOOBJDUMP
|
2021-02-18 15:03:25 +00:00
|
|
|
$(call echo,Dumping debugging info)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(EXENAME) > $(BIN)/$(DBGNAME).txt
|
2020-10-12 21:59:47 +00:00
|
|
|
ifdef WINDOWSHELL
|
2014-03-15 16:59:03 +00:00
|
|
|
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
|
2020-10-12 21:59:47 +00:00
|
|
|
else
|
2014-03-15 16:59:03 +00:00
|
|
|
-$(GZIP) $(GZIP_OPT2) $(BIN)/$(DBGNAME).txt
|
|
|
|
endif
|
|
|
|
endif
|
2016-05-19 00:14:53 +00:00
|
|
|
|
2016-05-19 04:52:06 +00:00
|
|
|
# mac os x lsdlsrb2 does not like objcopy
|
2016-05-19 00:14:53 +00:00
|
|
|
ifndef MACOSX
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJCOPY) $(BIN)/$(EXENAME) $(BIN)/$(DBGNAME)
|
|
|
|
$(OBJCOPY) --strip-debug $(BIN)/$(EXENAME)
|
|
|
|
-$(OBJCOPY) --add-gnu-debuglink=$(BIN)/$(DBGNAME) $(BIN)/$(EXENAME)
|
|
|
|
endif
|
|
|
|
ifndef NOUPX
|
|
|
|
-$(UPX) $(UPX_OPTS) $(BIN)/$(EXENAME)
|
|
|
|
endif
|
|
|
|
endif
|
2021-02-18 15:03:25 +00:00
|
|
|
$(call echo,Build is done$(,) please look for $(EXENAME) in $(BIN)$(,) (checking for post steps))
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
reobjdump:
|
2021-02-18 15:03:25 +00:00
|
|
|
$(call echo,Redumping debugging info)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDUMP) $(OBJDUMP_OPTS) $(BIN)/$(DBGNAME) > $(BIN)/$(DBGNAME).txt
|
2020-10-12 21:59:47 +00:00
|
|
|
ifdef WINDOWSHELL
|
2014-03-15 16:59:03 +00:00
|
|
|
-$(GZIP) $(GZIP_OPTS) $(BIN)/$(DBGNAME).txt
|
2020-10-12 21:59:47 +00:00
|
|
|
else
|
2014-03-15 16:59:03 +00:00
|
|
|
-$(GZIP) $(GZIP_OPT2) $(BIN)/$(DBGNAME).txt
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(OBJDIR):
|
|
|
|
-$(MKDIR) $(OBJDIR)
|
|
|
|
|
|
|
|
ifdef SDL
|
|
|
|
ifdef MINGW
|
|
|
|
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
|
|
|
|
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
2020-07-06 03:27:34 +00:00
|
|
|
command.h hardware/hw_data.h hardware/hw_defs.h \
|
2018-12-18 22:57:39 +00:00
|
|
|
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
|
|
|
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
|
|
|
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
2014-03-15 16:59:03 +00:00
|
|
|
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
else
|
|
|
|
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
|
|
|
|
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
|
2020-07-06 03:27:34 +00:00
|
|
|
command.h hardware/hw_data.h hardware/hw_defs.h \
|
2018-12-18 22:57:39 +00:00
|
|
|
hardware/hw_md2.h hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
|
|
|
|
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
|
|
|
|
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
|
2014-03-15 16:59:03 +00:00
|
|
|
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#dependecy made by gcc itself !
|
|
|
|
ifndef DUMMY
|
2021-02-18 15:03:25 +00:00
|
|
|
ifndef CLEANONLY
|
2021-02-18 14:15:11 +00:00
|
|
|
$(call print,Checking dependency files...)
|
|
|
|
-include $(DEPS)
|
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
2021-03-01 01:02:08 +00:00
|
|
|
undefine deps_rule
|
|
|
|
|
2021-02-18 14:15:11 +00:00
|
|
|
# windows makes it too hard !
|
|
|
|
ifndef WINDOWSHELL
|
2021-02-18 15:03:25 +00:00
|
|
|
ifdef echoName
|
2021-03-01 01:02:08 +00:00
|
|
|
define deps_rule =
|
2021-02-18 14:15:11 +00:00
|
|
|
@printf "%-20.20s\r" $<
|
2021-03-01 01:02:08 +00:00
|
|
|
|
|
|
|
endef
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
endif
|
2021-03-01 01:02:08 +00:00
|
|
|
|
|
|
|
define deps_rule +=
|
2021-04-06 10:55:57 +00:00
|
|
|
$(CC) $(CFLAGS) -M -MF $@ -MT $(OBJDIR)/$(<:.c=.o) $<
|
2021-03-01 01:02:08 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(DEPDIR)/%.d: %.c
|
|
|
|
$(deps_rule)
|
|
|
|
|
|
|
|
$(DEPDIR)/%.d: $(INTERFACE)/%.c
|
|
|
|
$(deps_rule)
|
|
|
|
|
|
|
|
$(DEPDIR)/%.d: hardware/%.c
|
|
|
|
$(deps_rule)
|
|
|
|
|
|
|
|
$(DEPDIR)/%.d: blua/%.c
|
|
|
|
$(deps_rule)
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifdef VALGRIND
|
|
|
|
$(OBJDIR)/z_zone.o: z_zone.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -DHAVE_VALGRIND $(VALGRIND_CFLAGS) -c $< -o $@
|
|
|
|
endif
|
|
|
|
|
2021-02-18 14:15:11 +00:00
|
|
|
$(OBJDIR)/comptime.o::
|
2021-02-18 15:03:25 +00:00
|
|
|
ifdef echoName
|
|
|
|
@echo -- comptime.c ...
|
2021-02-18 14:15:11 +00:00
|
|
|
endif
|
2021-02-18 15:03:25 +00:00
|
|
|
$(COMPTIME) .
|
2021-02-18 14:15:11 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c comptime.c -o $@
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
$(BIN)/%.mo: locale/%.po
|
|
|
|
-$(MKDIR) $(BIN)
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(MSGFMT) -f -o $@ $<
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: %.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: $(INTERFACE)/%.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
2016-05-19 00:14:53 +00:00
|
|
|
ifdef MACOSX
|
|
|
|
$(OBJDIR)/%.o: sdl/macosx/%.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2016-05-19 00:14:53 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
$(OBJDIR)/%.o: hardware/%.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: blua/%.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(LUA_CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: %.nas
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(NASM) $(NASMOPTS) -o $@ -f $(NASMFORMAT) $<
|
|
|
|
|
|
|
|
$(OBJDIR)/vid_copy.o: vid_copy.s asm_defs.inc
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(OPTS) $(ASFLAGS) -x assembler-with-cpp -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: %.s
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(OPTS) -x assembler-with-cpp -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(WINDRES) -i $< -O rc $(WINDRESFLAGS) --include-dir=win32 -o $@ -O coff
|
|
|
|
|
|
|
|
|
|
|
|
ifdef SDL
|
|
|
|
|
|
|
|
ifdef MINGW
|
|
|
|
$(OBJDIR)/win_dbg.o: win32/win_dbg.c
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef STATICHS
|
|
|
|
$(OBJDIR)/s_openal.o: hardware/s_openal/s_openal.c hardware/hw3dsdrv.h \
|
|
|
|
hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJDIR)/s_fmod.o: hardware/s_fmod/s_fmod.c hardware/hw3dsdrv.h \
|
|
|
|
hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
ifdef MINGW
|
|
|
|
$(OBJDIR)/s_ds3d.o: hardware/s_ds3d/s_ds3d.c hardware/hw3dsdrv.h \
|
|
|
|
hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2014-03-15 16:59:03 +00:00
|
|
|
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
|
|
|
|
$(OBJDIR)/s_fmod.o: hardware/s_fmod/s_fmod.c hardware/hw3dsdrv.h \
|
|
|
|
hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2018-12-30 02:55:13 +00:00
|
|
|
$(CC) $(ARCHOPTS) -Os -o $(OBJDIR)/s_fmod.o -DHW3SOUND -DUNIXCOMMON -shared -nostartfiles -c hardware/s_fmod/s_fmod.c
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/s_openal.o: hardware/s_openal/s_openal.c hardware/hw3dsdrv.h \
|
|
|
|
hardware/hw_dll.h
|
2020-11-19 21:17:56 +00:00
|
|
|
$(echoName)
|
2018-12-30 02:55:13 +00:00
|
|
|
$(CC) $(ARCHOPTS) -Os -o $(OBJDIR)/s_openal.o -DHW3SOUND -DUNIXCOMMON -shared -nostartfiles -c hardware/s_openal/s_openal.c
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
#############################################################
|