mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Build tweaks:
Set up the use of {Windows,Apple}/{include,lib} regardless of feature toggles in Makefile.common using $(abspath ) in reference to the directory Makefile.common is in. Add the three DirectX headers that are actually used to the repo. (from: http://alleg.sourceforge.net/files/dx9mgw.zip) Since current MinGW versions include DirectX libs (for dynamic linking), remove "-L$(DXROOT)/lib". The DirectX headers are no longer a separate dependency for building. Add $(SDLROOT_OVERRIDE). $(SDLROOT) only functions for Windows and Mac OS X. Factor handling of $(DXROOT_OVERRIDE) and $(SDLROOT_OVERRIDE) into Makefile.shared using $(abspath ). git-svn-id: https://svn.eduke32.com/eduke32@3275 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6f2fa332dd
commit
9fcba228b1
8 changed files with 12626 additions and 53 deletions
|
@ -5,15 +5,6 @@
|
|||
include Makefile.common
|
||||
|
||||
|
||||
# SDK locations for Windows - adjust to match your setup
|
||||
#
|
||||
ifneq ($(DXROOT_OVERRIDE),)
|
||||
DXROOT=$(DXROOT_OVERRIDE)
|
||||
else
|
||||
DXROOT=../sdk/dx
|
||||
#DXROOT=c:/sdks/directx/dx8
|
||||
endif
|
||||
|
||||
# Build locations
|
||||
#
|
||||
SRC=source
|
||||
|
@ -64,15 +55,10 @@ endif
|
|||
|
||||
include $(EROOT)/Makefile.shared
|
||||
|
||||
|
||||
OURLIBS=$(LIBS) $(BASELIBS) $(BUILDLIBS)
|
||||
|
||||
|
||||
ifneq (0,$(USE_LIBVPX))
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
LIBS+= -LWindows/lib
|
||||
OURCOMMONFLAGS+= -IWindows/include
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
# vpx headers and lib from 'port install libvpx' or 'brew install libvpx'
|
||||
LIBS+= -L/opt/local/lib -L/usr/local/lib
|
||||
|
@ -221,7 +207,7 @@ ifeq ($(PLATFORM),WII)
|
|||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
OURCOMMONFLAGS += -fno-pic -I$(abspath Apple) -I$(abspath Apple/include)
|
||||
OURCOMMONFLAGS += -fno-pic
|
||||
|
||||
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
ifeq (,$(ARCH))
|
||||
|
@ -273,7 +259,7 @@ ifeq ($(PLATFORM),WINDOWS)
|
|||
JAUDIOLIB=libjfaudiolib_win32.a
|
||||
ENETLIB=libenet_win32.a
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
OURCOMMONFLAGS += -I$(DXROOT)/include
|
||||
OURCOMMONFLAGS += -I$(DXROOT) -I$(DXROOT)/include
|
||||
LIBS+= -ldsound
|
||||
GAMEOBJS+= $(OBJ)/music.$o $(OBJ)/midi.$o $(OBJ)/mpu401.$o
|
||||
endif
|
||||
|
@ -281,7 +267,8 @@ endif
|
|||
# -lGLU to build with gluBuild2DMipmaps
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
LIBS+= Windows/lib/SDL_mixer.lib
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
LIBS+= Windows/lib/SDL_mixer.lib -L$(SDLROOT)/lib
|
||||
else
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
LIBS+= -l$(SDLNAME)_mixer
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
## common definitions for Makefile, build/Makefile, source/enet/Makefile and
|
||||
## source/jaudiolib/Makefile
|
||||
|
||||
MAKEFILE_COMMON:=$(lastword $(MAKEFILE_LIST))
|
||||
|
||||
# Use colored output
|
||||
PRETTY_OUTPUT ?= 1
|
||||
|
||||
|
@ -90,11 +92,6 @@ endif
|
|||
# Binary suffix override:
|
||||
EXESUFFIX_OVERRIDE ?=
|
||||
|
||||
# DirectX SDK location - if nonempty, overrides the DXROOTs of the individual
|
||||
# Makefiles. Should be set to an absolute path since this Makefile is included
|
||||
# at different directory levels
|
||||
DXROOT_OVERRIDE:=
|
||||
|
||||
# Mac OS X Frameworks location
|
||||
# Like above, use absolute paths.
|
||||
APPLE_FRAMEWORKS ?=/Library/Frameworks
|
||||
|
@ -331,6 +328,16 @@ ifeq (0,$(NETCODE))
|
|||
endif
|
||||
|
||||
|
||||
# Set up target-specific headers and libs that work across all Makefiles
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
BASELIBS+= -L$(abspath $(dir $(MAKEFILE_COMMON))Windows/lib)
|
||||
BASECOMMONFLAGS+= -I$(abspath $(dir $(MAKEFILE_COMMON))Windows/include)
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
BASELIBS+= -L$(abspath $(dir $(MAKEFILE_COMMON))Apple/lib)
|
||||
BASECOMMONFLAGS+= -I$(abspath $(dir $(MAKEFILE_COMMON))Apple/include)
|
||||
endif
|
||||
|
||||
#### Lunatic development, do not touch!
|
||||
LUNATIC=0
|
||||
LUAJIT=luajit
|
||||
|
@ -351,7 +358,7 @@ ifneq ($(LUNATIC),0)
|
|||
BASECOMMONFLAGS+= -I$(SRC)/lunatic -DLUNATIC
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
BASELIBS+= -LWindows/lib -lluajit
|
||||
BASELIBS+= -lluajit
|
||||
else
|
||||
BASELIBS+= -lluajit-5.1
|
||||
endif
|
||||
|
|
5793
polymer/eduke32/Windows/include/ddraw.h
Normal file
5793
polymer/eduke32/Windows/include/ddraw.h
Normal file
File diff suppressed because it is too large
Load diff
4418
polymer/eduke32/Windows/include/dinput.h
Normal file
4418
polymer/eduke32/Windows/include/dinput.h
Normal file
File diff suppressed because it is too large
Load diff
2359
polymer/eduke32/Windows/include/dsound.h
Normal file
2359
polymer/eduke32/Windows/include/dsound.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -5,15 +5,6 @@
|
|||
include ../Makefile.common
|
||||
|
||||
|
||||
# SDK locations for Windows - adjust to match your setup
|
||||
#
|
||||
ifneq ($(DXROOT_OVERRIDE),)
|
||||
DXROOT=$(DXROOT_OVERRIDE)
|
||||
else
|
||||
DXROOT=../../sdk/dx
|
||||
#DXROOT=c:/sdks/directx/dx8
|
||||
endif
|
||||
|
||||
# Build locations - OBJ gets overridden to the game-specific objects dir
|
||||
#
|
||||
OBJ?=obj.gnu
|
||||
|
@ -135,6 +126,10 @@ endif
|
|||
ifeq ($(RENDERTYPE),SDL)
|
||||
ENGINEOBJS+= $(OBJ)/sdlayer.$o
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
ifeq (,$(ARCH))
|
||||
|
@ -164,7 +159,7 @@ ifeq ($(RENDERTYPE),SDL)
|
|||
endif
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
OURCOMMONFLAGS+= -I$(DXROOT)/include
|
||||
OURCOMMONFLAGS+= -I$(DXROOT) -I$(DXROOT)/include
|
||||
ENGINEOBJS+= $(OBJ)/winlayer.$o $(OBJ)/rawinput.$o
|
||||
endif
|
||||
|
||||
|
@ -261,13 +256,13 @@ cacheinfo$(EXESUFFIX): $(OBJ)/cacheinfo.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.
|
|||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
getdxdidf$(EXESUFFIX): $(OBJ)/getdxdidf.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -ldinput; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT) -I$(DXROOT)/include -ldinput; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
makesdlkeytrans$(EXESUFFIX): $(OBJ)/makesdlkeytrans.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(L_CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
# Shared make information between Build engine and games
|
||||
|
||||
MAKEFILE_SHARED:=$(lastword $(MAKEFILE_LIST))
|
||||
|
||||
ENGINELIB=libengine.a
|
||||
EDITORLIB=libbuild.a
|
||||
|
||||
|
||||
# SDK locations - adjust to match your setup
|
||||
# Overrides must use absolute paths since this Makefile is included at different directory levels
|
||||
#
|
||||
SDLCONFIG = /usr/local/bin/sdl-config
|
||||
SDLNAME = SDL
|
||||
|
||||
DXROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/dx)
|
||||
#DXROOT=/c/sdks/directx/dx8
|
||||
SDLROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/SDL)
|
||||
|
||||
ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG))
|
||||
# $(info Detected locally installed SDL 1.X)
|
||||
SDLROOT = /usr/local
|
||||
|
@ -27,6 +37,16 @@ endif
|
|||
|
||||
SDL_FRAMEWORK = 0
|
||||
|
||||
DXROOT_OVERRIDE ?=
|
||||
SDLROOT_OVERRIDE ?=
|
||||
ifneq ($(DXROOT_OVERRIDE),)
|
||||
DXROOT=$(DXROOT_OVERRIDE)
|
||||
endif
|
||||
ifneq ($(SDLROOT_OVERRIDE),)
|
||||
SDLROOT=$(SDLROOT_OVERRIDE)
|
||||
endif
|
||||
|
||||
|
||||
ifeq (4,$(GCC_MAJOR))
|
||||
L_SSP := -lssp
|
||||
endif
|
||||
|
@ -202,7 +222,7 @@ ifeq ($(RENDERTYPE),SDL)
|
|||
endif
|
||||
else
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
BUILDLIBS+= -L$(DXROOT)/lib -ldxguid
|
||||
BUILDLIBS+= -ldxguid
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -247,9 +267,7 @@ endif
|
|||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
# XXX: these assume that the compiler runs from build/. Ugh.
|
||||
BUILDLIBS+= -L../Windows/lib -lpng_mini -lz_mini
|
||||
BUILDCOMMONFLAGS+= -I../Windows/include
|
||||
BUILDLIBS+= -lpng_mini -lz_mini
|
||||
endif
|
||||
else
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
|
|
|
@ -6,14 +6,6 @@ OBJNAME=libjfaudiolib.a
|
|||
SRC=src
|
||||
INC=include
|
||||
|
||||
# SDK locations - adjust to match your setup
|
||||
ifneq ($(DXROOT_OVERRIDE),)
|
||||
DXROOT ?= $(DXROOT_OVERRIDE)
|
||||
else
|
||||
DXROOT=../../../sdk/dx
|
||||
#DXROOT ?= c:/sdks/directx/dx8
|
||||
endif
|
||||
|
||||
# for BUILD_ECHOFLAGS:
|
||||
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(SRC)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
|
@ -29,11 +21,12 @@ OURCXXFLAGS=$(BASECXXFLAGS)
|
|||
PRINTLDFLAGS=$(BASELDFLAGS)
|
||||
OURASFLAGS=$(BASEASFLAGS)
|
||||
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
APPLE_INCLUDE_DIR:=../../Apple/include
|
||||
OURCOMMONFLAGS += -I$(APPLE_INCLUDE_DIR) -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
||||
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
else
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -54,7 +47,7 @@ OBJECTS=$(OBJ)/drivers.o \
|
|||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
OURCOMMONFLAGS+= -DHAVE_DS -I$(DXROOT)/include
|
||||
OURCOMMONFLAGS+= -DHAVE_DS -I$(DXROOT) -I$(DXROOT)/include
|
||||
OBJECTS+= $(OBJ)/driver_directsound.o
|
||||
endif
|
||||
|
||||
|
@ -65,6 +58,9 @@ endif
|
|||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
OURCOMMONFLAGS+= -DHAVE_SDL
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS+=`pkg-config --cflags vorbis`
|
||||
|
|
Loading…
Reference in a new issue