Strip out most duplicated Makefile stuff into Makefile.common -- this should make configuration and maintenance much less troublesome. Attention to everyone who builds their own Edukes: you may have to re-set some paths like the one to the DirectX SDK.

git-svn-id: https://svn.eduke32.com/eduke32@1739 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2010-12-19 22:29:01 +00:00
parent 2fec586906
commit 00fbd8267e
6 changed files with 193 additions and 198 deletions

View file

@ -2,44 +2,21 @@
# EDuke32 Makefile for GNU Make # EDuke32 Makefile for GNU Make
# #
# DEFINES include Makefile.common
# Use colored output
PRETTY_OUTPUT = 1
# SDK locations - adjust to match your setup # SDK locations - adjust to match your setup
ifneq ($(DXROOT_OVERRIDE),)
DXROOT=$(DXROOT_OVERRIDE)
else
DXROOT=../sdk/dx DXROOT=../sdk/dx
#DXROOT=c:/sdks/directx/dx8 #DXROOT=c:/sdks/directx/dx8
# Engine options
SUPERBUILD = 1
POLYMOST = 1
POLYMER = 1
USE_OPENGL = 1
NOASM = 0
LINKED_GTK = 0
BUILD32_ON_64 = 0
NEDMALLOC = 1
# Debugging/Build options
RELEASE?=1
DEBUGANYWAY?=0
KRANDDEBUG?=0
NOSOUND?=0
OPTLEVEL?=2
PROFILER?=0
ifneq (0,$(KRANDDEBUG))
RELEASE=0
endif
ifneq (0,$(PROFILER))
DEBUGANYWAY=1
endif endif
# Build locations # Build locations
SRC=source SRC=source
RSRC=rsrc RSRC=rsrc
EROOT=build
ESRC=$(EROOT)/src ESRC=$(EROOT)/src
EINC=$(EROOT)/include EINC=$(EROOT)/include
INC=$(SRC) INC=$(SRC)
@ -48,22 +25,21 @@ o=o
ifneq (0,$(RELEASE)) ifneq (0,$(RELEASE))
# Debugging disabled # Debugging disabled
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL) $(F_NO_STACK_PROTECTOR) debug+= $(F_NO_STACK_PROTECTOR)
LIBS=-lm
else else
# Debugging enabled # Debugging enabled
debug=-ggdb -O0 -DDEBUGGINGAIDS
LIBS=-lm -rdynamic
ifneq (0,$(KRANDDEBUG)) ifneq (0,$(KRANDDEBUG))
debug+= -fno-inline -fno-inline-functions -fno-inline-functions-called-once debug+= -fno-inline -fno-inline-functions -fno-inline-functions-called-once
debug+=-DKRANDDEBUG=1
endif endif
endif endif
ifneq (0,$(DEBUGANYWAY)) OURCFLAGS=$(BASECFLAGS) \
debug+=-ggdb -I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(JAUDIOLIBDIR)/include -I$(ENETDIR)/include \
endif $(ARCH)
OURCXXFLAGS=$(BASECXXFLAGS)
NASMFLAGS=$(BASEASFLAGS)
JAUDIOLIBDIR=$(SRC)/jaudiolib JAUDIOLIBDIR=$(SRC)/jaudiolib
JAUDIOLIB=libjfaudiolib.a JAUDIOLIB=libjfaudiolib.a
@ -71,24 +47,10 @@ JAUDIOLIB=libjfaudiolib.a
ENETDIR=$(SRC)/enet ENETDIR=$(SRC)/enet
ENETLIB=libenet.a ENETLIB=libenet.a
CC=gcc
CXX=g++
AS=nasm
RC=windres
STRIP=strip
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(JAUDIOLIBDIR)/include -I$(ENETDIR)/include -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(ARCH)
OURCXXFLAGS=-fno-exceptions -fno-rtti
NASMFLAGS= -s
EXESUFFIX=
include $(EROOT)/Makefile.shared include $(EROOT)/Makefile.shared
ifeq ($(PLATFORM),WINDOWS) ifeq ($(PLATFORM),WINDOWS)
OBJ=obj_win OBJ=obj_win
EOBJ=eobj_win EOBJ=eobj_win
@ -138,7 +100,8 @@ EDITOROBJS=$(OBJ)/astub.$o \
$(OBJ)/m32def.$o \ $(OBJ)/m32def.$o \
$(OBJ)/m32exec.$o \ $(OBJ)/m32exec.$o \
$(OBJ)/m32vars.$o \ $(OBJ)/m32vars.$o \
$(OBJ)/mathutil.$o $(OBJ)/mathutil.$o \
$(OBJ)/sounds_mapster32.$o
# PLATFORM SPECIFIC SETTINGS # PLATFORM SPECIFIC SETTINGS
@ -200,7 +163,6 @@ else
endif endif
EDITOROBJS+= $(OBJ)/sounds_mapster32.$o
OURCFLAGS+= $(BUILDCFLAGS) OURCFLAGS+= $(BUILDCFLAGS)
OURCXXFLAGS+= $(BUILDCFLAGS) OURCXXFLAGS+= $(BUILDCFLAGS)
@ -255,7 +217,8 @@ enginelib editorlib:
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(EROOT)\033[0;35m \033[0m\n" printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(EROOT)\033[0;35m \033[0m\n"
endif endif
$(MAKE) -C $(EROOT)/ "OBJ=../$(EOBJ)" \ $(MAKE) -C $(EROOT)/ "OBJ=../$(EOBJ)" $@
#\
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) DEBUGANYWAY=$(DEBUGANYWAY) KRANDDEBUG=$(KRANDDEBUG)\ SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) DEBUGANYWAY=$(DEBUGANYWAY) KRANDDEBUG=$(KRANDDEBUG)\
USE_OPENGL=$(USE_OPENGL) BUILD32_ON_64=$(BUILD32_ON_64) PROFILER=$(PROFILER)\ USE_OPENGL=$(USE_OPENGL) BUILD32_ON_64=$(BUILD32_ON_64) PROFILER=$(PROFILER)\
NOASM=$(NOASM) NEDMALLOC=$(NEDMALLOC) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL) $@ NOASM=$(NOASM) NEDMALLOC=$(NEDMALLOC) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL) $@
@ -269,7 +232,7 @@ $(JAUDIOLIBDIR)/$(JAUDIOLIB):
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(JAUDIOLIBDIR)\033[0;35m \033[0m\n" printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(JAUDIOLIBDIR)\033[0;35m \033[0m\n"
endif endif
$(MAKE) -C $(JAUDIOLIBDIR) PRETTY_OUTPUT=$(PRETTY_OUTPUT) EROOT=$(EROOT) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL) DEBUGANYWAY=$(DEBUGANYWAY) $(MAKE) -C $(JAUDIOLIBDIR) #PRETTY_OUTPUT=$(PRETTY_OUTPUT) EROOT=$(EROOT) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL) DEBUGANYWAY=$(DEBUGANYWAY)
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n" printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
endif endif
@ -278,7 +241,7 @@ $(ENETDIR)/$(ENETLIB):
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(ENETDIR)\033[0;35m \033[0m\n" printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(ENETDIR)\033[0;35m \033[0m\n"
endif endif
$(MAKE) -C $(ENETDIR) PRETTY_OUTPUT=$(PRETTY_OUTPUT) EROOT=$(EROOT) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL) $(MAKE) -C $(ENETDIR) #PRETTY_OUTPUT=$(PRETTY_OUTPUT) EROOT=$(EROOT) RELEASE=$(RELEASE) OPTLEVEL=$(OPTLEVEL)
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n" printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
endif endif

View file

@ -0,0 +1,101 @@
## common definitions for Makefile, build/Makefile, source/enet/Makefile and
## source/jaudiolib/Makefile
# Use colored output
PRETTY_OUTPUT = 1
# 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:=
# Engine options
# SUPERBUILD - enables voxels
# POLYMOST - enables Polymost renderer
# USE_OPENGL - enables OpenGL support in Polymost
# NOASM - disables the use of inline assembly pragmas
# LINKED_GTK - enables compile-time linkage to GTK
#
SUPERBUILD = 1
POLYMOST = 1
POLYMER = 1
USE_OPENGL = 1
NOASM = 0
LINKED_GTK = 0
BUILD32_ON_64 = 0
NEDMALLOC = 1
ifeq (0,$(USE_OPENGL))
POLYMOST = 0
POLYMER = 0
endif
# Debugging/Build options
# RELEASE - 1 = no debugging
# DEBUGANYWAY - 1 = include debug symbols even when generating release code
# KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
# EFENCE - 1 = compile with Electric Fence for malloc() debugging
# OPTLEVEL - 0..3 = GCC optimization strategy
#
RELEASE?=1
DEBUGANYWAY?=0
KRANDDEBUG?=0
EFENCE?=0
OPTLEVEL?=2
PROFILER?=0
NOSOUND?=0
ifneq (0,$(KRANDDEBUG))
RELEASE=0
endif
ifneq (0,$(PROFILER))
DEBUGANYWAY=1
endif
# Tools
CC=gcc
CXX=g++
AS=nasm
AR=ar
RC=windres
RANLIB=ranlib
STRIP=strip
# compiler flags etc.
LIBS=-lm
ifneq (0,$(RELEASE))
# Debugging disabled
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
else
# Debugging enabled
debug=-ggdb -O0 -DDEBUGGINGAIDS
LIBS+=-rdynamic
ifneq (0,$(PROFILER))
LIBS+= -lprofiler
debug+= -pg
endif
ifneq (0,$(KRANDDEBUG))
debug+=-DKRANDDEBUG=1
endif
endif
ifneq (0,$(DEBUGANYWAY))
debug+=-ggdb
endif
BASECFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES)
BASECXXFLAGS= -fno-exceptions -fno-rtti
BASEASFLAGS=-s #-g
# Misc. stuff that is constant between Makefiles
EROOT:=build
# will be potentially overridden in build/Makefile.shared
EXESUFFIX=

View file

@ -8,52 +8,16 @@
# try again. If things are still going wrong, call me. # try again. If things are still going wrong, call me.
# #
# Use colored output include ../Makefile.common
PRETTY_OUTPUT = 1
# Engine options - these may be overridden by game makefiles
# SUPERBUILD - enables voxels
# POLYMOST - enables Polymost renderer
# USE_OPENGL - enables OpenGL support in Polymost
# NOASM - disables the use of inline assembly pragmas
# LINKED_GTK - enables compile-time linkage to GTK
#
SUPERBUILD ?= 1
POLYMOST ?= 1
POLYMER ?= 1
USE_OPENGL ?= 1
NOASM ?= 0
LINKED_GTK ?= 0
BUILD32_ON_64 ?= 0
NEDMALLOC ?= 1
ifeq (0,$(USE_OPENGL))
POLYMER = 0
endif
# Debugging/Build options
# RELEASE - 1 = no debugging
# EFENCE - 1 = compile with Electric Fence for malloc() debugging
# OPTLEVEL - 0..3 = GCC optimization strategy
#
RELEASE?=1
DEBUGANYWAY?=0
KRANDDEBUG?=0
EFENCE?=0
OPTLEVEL?=2
PROFILER?=0
ifneq (0,$(KRANDDEBUG))
RELEASE=0
endif
ifneq (0,$(PROFILER))
DEBUGANYWAY=1
endif
# SDK locations for Windows - adjust to match your setup # SDK locations for Windows - adjust to match your setup
# #
ifneq ($(DXROOT_OVERRIDE),)
DXROOT=$(DXROOT_OVERRIDE)
else
DXROOT=c:/sdks/directx/dx61 DXROOT=c:/sdks/directx/dx61
endif
FMODROOTWIN=c:/sdks/fmodapi374win/api FMODROOTWIN=c:/sdks/fmodapi374win/api
# Build locations - OBJ gets overridden to the game-specific objects dir # Build locations - OBJ gets overridden to the game-specific objects dir
@ -75,45 +39,22 @@ asm=nasm
# #
ifneq ($(RELEASE),0) ifneq ($(RELEASE),0)
# Debugging disabled # Debugging disabled
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL) $(F_NO_STACK_PROTECTOR) debug+= $(F_NO_STACK_PROTECTOR)
LIBS=-lm
else else
# Debugging enabled # Debugging enabled
debug=-ggdb -O0 -DDEBUGGINGAIDS -DNOSDLPARACHUTE debug+= -DNOSDLPARACHUTE
LIBS=-lm $(L_SSP) -Wl,--enable-auto-import -rdynamic LIBS+= $(L_SSP) -Wl,--enable-auto-import
ifneq (0,$(KRANDDEBUG))
debug+=-DKRANDDEBUG=1
endif
ifneq (0,$(PROFILER))
LIBS+= -lprofiler
debug+= -pg
endif
endif endif
ifneq (0,$(DEBUGANYWAY)) OURCFLAGS=$(BASECFLAGS) -Wno-char-subscripts -DKSFORBUILD -I$(INC) $(ARCH)
debug+=-ggdb OURCXXFLAGS=$(BASECXXFLAGS)
endif ASFLAGS=$(BASEASFLAGS)
CC=gcc
CXX=gcc
AS=nasm
RC=windres
AR=ar
RANLIB=ranlib
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-Wno-char-subscripts -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
-DKSFORBUILD -I$(INC) -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(ARCH)
OURCXXFLAGS=-fno-exceptions -fno-rtti
ASFLAGS=-s #-g
EXESUFFIX=
UTILLIBS=-lpthread
include Makefile.shared include Makefile.shared
UTILLIBS=-lpthread
ENGINEOBJS= ENGINEOBJS=
ifeq (0,$(NOASM)) ifeq (0,$(NOASM))
ENGINEOBJS+= $(OBJ)/a.$o ENGINEOBJS+= $(OBJ)/a.$o
@ -226,12 +167,16 @@ utils: $(UTILS)
enginelib: $(OBJ)/$(ENGINELIB) enginelib: $(OBJ)/$(ENGINELIB)
$(OBJ)/$(ENGINELIB): $(ENGINEOBJS) $(OBJ)/$(ENGINELIB): $(ENGINEOBJS)
$(AR) rc $@ $^ $(BUILD_ECHOFLAGS)
$(ARCHIVE_STATUS)
if $(AR) rc $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
$(RANLIB) $@ $(RANLIB) $@
editorlib: $(OBJ)/$(EDITORLIB) editorlib: $(OBJ)/$(EDITORLIB)
$(OBJ)/$(EDITORLIB): $(EDITOROBJS) $(OBJ)/$(EDITORLIB): $(EDITOROBJS)
$(AR) rc $@ $^ $(BUILD_ECHOFLAGS)
$(ARCHIVE_STATUS)
if $(AR) rc $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
$(RANLIB) $@ $(RANLIB) $@
pragmacheck$(EXESUFFIX): $(OBJ)/pragmacheck.$o $(OBJ)/pragmas.$o pragmacheck$(EXESUFFIX): $(OBJ)/pragmacheck.$o $(OBJ)/pragmas.$o

View file

@ -214,19 +214,27 @@ endif
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
BUILD_STARTED = printf "\033[K\033[1;36mBuild started using \"$(CC) $(OURCFLAGS)\"\033[0m\n" BUILD_STARTED = printf "\033[K\033[1;36mBuild started using \"$(CC) $(OURCFLAGS)\"\033[0m\n"
BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using \"$(CC) $(OURCFLAGS)\"\033[0m\n"
BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n" BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n"
COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r" COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r"
COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n" COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n"
COMPILE_FAILED = printf "\033[K\033[0;31mFailed building \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1 COMPILE_FAILED = printf "\033[K\033[0;31mFailed building \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
ARCHIVE_STATUS = printf "\033[K\033[0mCreating library archive \033[1m$@\033[0m...\033[0m\r"
ARCHIVE_OK = printf "\033[K\033[0;32mCreated library archive \033[1;32m$@\033[0;32m \033[0m\n"
ARCHIVE_FAILED = printf "\033[K\033[0;31mFailed creating library archive \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r" LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r"
LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n" LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n"
LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1 LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
else else
BUILD_STARTED = BUILD_STARTED =
BUILD_ECHOFLAGS=
BUILD_FINISHED = BUILD_FINISHED =
COMPILE_STATUS = COMPILE_STATUS =
COMPILE_OK = true COMPILE_OK = true
COMPILE_FAILED = false; exit 1 COMPILE_FAILED = false; exit 1
ARCHIVE_STATUS =
ARCHIVE_OK = true
ARCHIVE_FAILED = false; exit 1
LINK_STATUS = LINK_STATUS =
LINK_OK = true LINK_OK = true
LINK_FAILED = false; exit 1 LINK_FAILED = false; exit 1

View file

@ -1,33 +1,17 @@
CC=gcc include ../../Makefile.common
include ../../$(EROOT)/Makefile.shared
OBJ=obj OBJ=obj
OBJNAME?=libenet.a OBJNAME=libenet.a
PRETTY_OUTPUT?=1
EROOT?=build
RELEASE?=1
OPTLEVEL?=2
SRC=src SRC=src
INC=include INC=include
include ../../$(EROOT)/Makefile.shared CFLAGS=$(BASECFLAGS) $(F_NO_STACK_PROTECTOR)
# for BUILD_ECHOFLAGS:
ifneq (0,$(RELEASE)) OURCFLAGS=$(CFLAGS)
# Debugging disabled
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
else
# Debugging enabled
debug=-ggdb -O0 -DDEBUGGINGAIDS
endif
ifneq (0,$(DEBUGANYWAY))
debug+=-ggdb
endif
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(F_NO_STACK_PROTECTOR)
CPPFLAGS=-I$(INC) -I$(SRC) -I../../$(EROOT)/include CPPFLAGS=-I$(INC) -I$(SRC) -I../../$(EROOT)/include
OBJECTS=$(OBJ)/callbacks.o \ OBJECTS=$(OBJ)/callbacks.o \
$(OBJ)/host.o \ $(OBJ)/host.o \
$(OBJ)/list.o \ $(OBJ)/list.o \
@ -47,7 +31,9 @@ endif
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o) # OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
$(OBJNAME): $(OBJECTS) $(OBJNAME): $(OBJECTS)
$(AR) cr $@ $^ $(BUILD_ECHOFLAGS)
$(ARCHIVE_STATUS)
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
-mkdir -p $(OBJ) -mkdir -p $(OBJ)

View file

@ -1,33 +1,23 @@
CC=gcc include ../../Makefile.common
OBJ=obj
OBJNAME?=libjfaudiolib.a
PRETTY_OUTPUT?=1
EROOT?=build
RELEASE?=1
OPTLEVEL?=2
SRC=src
DXROOT ?= c:/sdks/directx/dx8
include ../../$(EROOT)/Makefile.shared include ../../$(EROOT)/Makefile.shared
ifneq (0,$(RELEASE)) OBJ=obj
# Debugging disabled OBJNAME=libjfaudiolib.a
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL) SRC=src
INC=include
# SDK locations - adjust to match your setup
ifneq ($(DXROOT_OVERRIDE),)
DXROOT ?= $(DXROOT_OVERRIDE)
else else
# Debugging enabled DXROOT ?= c:/sdks/directx/dx8
debug=-ggdb -O0 -DDEBUGGINGAIDS
endif endif
ifneq (0,$(DEBUGANYWAY)) CFLAGS=$(BASECFLAGS) $(F_NO_STACK_PROTECTOR)
debug+=-ggdb # for BUILD_ECHOFLAGS:
endif OURCFLAGS=$(CFLAGS)
CPPFLAGS=-I$(INC) -I$(SRC) -DHAVE_VORBIS
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(F_NO_STACK_PROTECTOR)
CPPFLAGS=-Iinclude -Isrc -DHAVE_VORBIS
OBJECTS=$(OBJ)/drivers.o \ OBJECTS=$(OBJ)/drivers.o \
$(OBJ)/fx_man.o \ $(OBJ)/fx_man.o \
@ -51,7 +41,9 @@ endif
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o) # OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
$(OBJNAME): $(OBJECTS) $(OBJNAME): $(OBJECTS)
$(AR) cr $@ $^ $(BUILD_ECHOFLAGS)
$(ARCHIVE_STATUS)
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
-mkdir -p $(OBJ) -mkdir -p $(OBJ)