Fix linking with CLANG=1 by separating $(INVOCATION) into $(COMPILER) and $(LINKER) and removing "-x" from clang as a linker in Makefile.common. Additionally, the Build tools are now affected by CPLUSPLUS=1, for which small corrections have been made.

git-svn-id: https://svn.eduke32.com/eduke32@3122 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-11-06 07:49:44 +00:00
parent b31d5c9d59
commit a0c6fb9805
10 changed files with 159 additions and 131 deletions

View file

@ -35,13 +35,14 @@ else
endif
endif
OURCFLAGS=$(BASECFLAGS) \
OURCOMMONFLAGS=$(BASECOMMONFLAGS) \
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(JAUDIOLIBDIR)/include -I$(ENETDIR)/include -I$(SRC)/xdelta3
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURASFLAGS=$(BASEASFLAGS)
OURLDFLAGS=$(BASELDFLAGS) $(BUILDLDFLAGS)
PRINTLDFLAGS=$(BASELDFLAGS)
OURLDFLAGS=$(OURCOMMONFLAGS) $(PRINTLDFLAGS)
# Game/editor-specific linker options
GAMELDFLAGS=
@ -59,12 +60,12 @@ include $(EROOT)/Makefile.shared
ifneq (0,$(USE_LIBVPX))
ifeq ($(PLATFORM),WINDOWS)
LIBS+= -LWindows/lib
OURCFLAGS+= -IWindows/include
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
OURCFLAGS+= -I/opt/local/include -I/usr/local/include
OURCOMMONFLAGS+= -I/opt/local/include -I/usr/local/include
endif
endif
@ -167,11 +168,11 @@ LUAJIT_WIN_SRC:= g:/mod/LuaJIT-2.0.0-beta8/src
ifneq (0,$(LUNATIC))
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -I$(LUAJIT_WIN_SRC)
OURCOMMONFLAGS+= -I$(LUAJIT_WIN_SRC)
else
OURCFLAGS+= -I/usr/include/luajit-2.0
OURCOMMONFLAGS+= -I/usr/include/luajit-2.0
endif
OURCFLAGS+= -I$(SRC)/lunatic -DLUNATIC
OURCOMMONFLAGS+= -I$(SRC)/lunatic -DLUNATIC
ifeq ($(PLATFORM),WINDOWS)
LIBS+= -LWindows/lib -lluajit
@ -201,11 +202,11 @@ ifneq (0,$(LUNATIC))
STRIP+= -s $(SRC)/lunatic/dynsymlist_osx
MISCGAMEDEPS+= $(SRC)/lunatic/dynsymlist_osx
OURLDFLAGS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(SRC)/lunatic/dynsymlist_osx
PRINTLDFLAGS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(SRC)/lunatic/dynsymlist_osx
endif
ifeq ($(PLATFORM),WINDOWS)
MISCGAMEDEPS+= $(SRC)/lunatic/eduke32.def
OURLDFLAGS+= $(SRC)/lunatic/eduke32.def
PRINTLDFLAGS+= $(SRC)/lunatic/eduke32.def
endif
ifeq ($(PLATFORM),LINUX)
# TODO: Windows, OS X
@ -219,7 +220,7 @@ endif
ifeq ($(PLATFORM),LINUX)
ifeq (0,$(CLANG))
OURCFLAGS += -fno-pic
OURCOMMONFLAGS += -fno-pic
endif
OURASFLAGS += -f elf
LIBS += -lvorbisfile -lvorbis -logg
@ -230,7 +231,7 @@ ifeq ($(PLATFORM),WII)
endif
ifeq ($(PLATFORM),DARWIN)
OURCFLAGS += -fno-pic -I$(abspath Apple) -I$(abspath Apple/include)
OURCOMMONFLAGS += -fno-pic -I$(abspath Apple) -I$(abspath Apple/include)
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
ifeq (,$(ARCH))
@ -243,7 +244,7 @@ ifeq ($(PLATFORM),DARWIN)
endif
ifeq (1,$(SDL_FRAMEWORK))
OURCFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
LIBS += -LApple/lib -lvorbisfile -lvorbis -logg -lm \
@ -257,7 +258,7 @@ ifeq ($(PLATFORM),DARWIN)
EDITOROBJS+=$(OBJ)/SDLMain.$o
GAMEOBJS+=$(OBJ)/SDLMain.$o
else
OURCFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
LIBS += -lvorbisfile -lvorbis -logg -lm -lSDL_mixer \
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
-Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
@ -274,7 +275,7 @@ ifeq ($(PLATFORM),DARWIN)
endif
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS += -fno-pic -DUNDERSCORES -I$(DXROOT)/include
OURCOMMONFLAGS += -fno-pic -DUNDERSCORES -I$(DXROOT)/include
OURASFLAGS+= -DUNDERSCORES -f win32
LIBS += -L$(JAUDIOLIBDIR)/third-party/mingw32/lib -lvorbisfile -lvorbis -logg -lwsock32 -lws2_32 -lwinmm -ldsound
GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o $(OBJ)/music.$o $(OBJ)/midi.$o $(OBJ)/mpu401.$o
@ -286,15 +287,15 @@ else
ifeq ($(RENDERTYPE),SDL)
ifeq (0,$(SDL_FRAMEWORK))
ifneq ($(PLATFORM),WII)
OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))
OURCOMMONFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))
endif
LIBS+= -l$(SDLNAME)_mixer
else
OURCFLAGS += -DSDL_FRAMEWORK
OURCOMMONFLAGS += -DSDL_FRAMEWORK
endif
ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
OURCOMMONFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
EDITOROBJS+= $(OBJ)/editor_banner.$o
endif
@ -305,29 +306,31 @@ else
endif
OURCFLAGS+= $(BUILDCFLAGS)
OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
ifeq ($(PLATFORM),WINDOWS)
OURLDFLAGS+= -Wl,--large-address-aware
PRINTLDFLAGS+= -Wl,--large-address-aware
endif
#ifneq (0,$(KRANDDEBUG))
ifeq ($(PLATFORM),DARWIN)
OURLDFLAGS+=-Wl,-map -Wl,$@.memmap
PRINTLDFLAGS+=-Wl,-map -Wl,$@.memmap
else
OURLDFLAGS+=-Wl,-Map=$@.memmap
PRINTLDFLAGS+=-Wl,-Map=$@.memmap
endif
#endif
ifneq (0,$(PROFILER))
OURLDFLAGS+=-pg
PRINTLDFLAGS+=-pg
endif
ifeq ($(PLATFORM),WII)
OURLDFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections -Wl,-Map,$(notdir $@).map
PRINTLDFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections -Wl,-Map,$(notdir $@).map
# -msdata=eabi
endif
INVOCATION=$(CC) $(OURCONLYFLAGS)
COMPILER=$(CC) $(OURCONLYFLAGS)
LINKER=$(L_CC)
ifneq ($(CPLUSPLUS),0)
INVOCATION=$(CXX) $(OURCXXFLAGS)
COMPILER=$(CXX) $(OURCXXFLAGS)
LINKER=$(L_CXX)
endif
ifeq ($(PRETTY_OUTPUT),1)
@ -354,7 +357,7 @@ notice:
$(EDUKE32): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB) $(MISCGAMEDEPS)
$(LINK_STATUS)
if $(INVOCATION) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(GAMELDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(GAMELDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY))
ifneq ($(PLATFORM),WII)
@ -370,7 +373,7 @@ endif
$(MAPSTER32): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
$(LINK_STATUS)
if $(INVOCATION) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(EDITORLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(EDITORLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY))
ifneq ($(PLATFORM),WII)
@ -429,7 +432,7 @@ $(OBJ)/%.$o: $(SRC)/%.nasm
$(OBJ)/%.$o: $(SRC)/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
#### Lunatic
@ -446,11 +449,11 @@ endif
$(OBJ)/%.$o: $(SRC)/lunatic/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/xdelta3/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
# TODO: _m32
# List of exported symbols, OS X
@ -470,7 +473,7 @@ $(SRC)/lunatic/eduke32.def: $(SRC)/lunatic/dynsymlist
$(OBJ)/%.$o: Apple/%.m
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.cc
$(COMPILE_STATUS)
@ -486,7 +489,7 @@ $(OBJ)/%.$o: $(SRC)/%.cxx
$(OBJ)/%.$o: $(SRC)/jmact/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.rc
$(COMPILE_STATUS)
@ -494,15 +497,15 @@ $(OBJ)/%.$o: $(SRC)/misc/%.rc
$(OBJ)/%.$o: $(RSRC)/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(RSRC)/game_banner.c: $(RSRC)/game.bmp
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@

View file

@ -14,11 +14,16 @@ RC=windres
RANLIB=ranlib
STRIP=strip
L_CC=$(CC)
L_CXX=$(CXX)
CLANG?=0
ifneq (0,$(CLANG))
CC=clang -x c -std=gnu89
CXX=clang -x c++
L_CC=clang -std=gnu89
L_CXX=clang
# AR=llvm-ar
# RANLIB=llvm-ranlib
endif
@ -122,7 +127,18 @@ DMALLOC?=0
OPTLEVEL?=2
PROFILER?=0
MUDFLAP?=0
LTO?=1
ifndef LTO
LTO=1
ifneq (0,$(CLANG))
ifeq ($(PLATFORM), WINDOWS)
LTO=0
endif
endif
endif
ifeq (4,$(GCC_MAJOR))
endif
ifeq (4,$(GCC_MAJOR))
F_NO_STACK_PROTECTOR := -fno-stack-protector
@ -142,7 +158,7 @@ ifeq ($(PLATFORM),DARWIN)
DARWIN9 ?= 1
endif
# BASECFLAGS += -fno-leading-underscore
# BASECOMMONFLAGS += -fno-leading-underscore
ifeq (1,$(DARWIN9))
F_JUMP_TABLES :=
@ -150,10 +166,10 @@ ifeq ($(PLATFORM),DARWIN)
endif
ifeq (1,$(BUILD32_ON_64))
BASECFLAGS += $(F_NO_STACK_PROTECTOR)
BASECOMMONFLAGS += $(F_NO_STACK_PROTECTOR)
else
ifeq ($(findstring ppc,$(ARCH)),ppc)
BASECFLAGS += $(F_NO_STACK_PROTECTOR)
BASECOMMONFLAGS += $(F_NO_STACK_PROTECTOR)
endif
endif
endif
@ -190,6 +206,7 @@ endif
# compiler flags etc.
BASECFLAGS=
BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
BASECXXFLAGS= -fno-exceptions -fno-rtti -fpermissive
BASEASFLAGS=-s #-g
@ -243,7 +260,7 @@ else
ifneq (0,$(CLANG))
# CLANG_MAJOR := $(shell clang -dM -E -x c /dev/null | grep __clang_major__ | awk '{ print $$3 }')
debug+= -fcatch-undefined-behavior
BASECFLAGS+= -Xclang -fcatch-undefined-behavior
# ifeq ($(CLANG_MAJOR),3)
# debug+= -faddress-sanitizer
# endif
@ -282,41 +299,41 @@ CWARNS := -W -Wall -Werror-implicit-function-declaration \
#-Wcast-qual -Wcast-align \
#-Waddress -Wlogical-op
BASECFLAGS=$(debug) $(OPTOPT) $(CWARNS) \
BASECOMMONFLAGS=$(debug) $(OPTOPT) $(CWARNS) \
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
$(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH)
ifneq (0,$(CLANG))
BASECFLAGS+= -Wno-unused-value -Wno-parentheses
BASECOMMONFLAGS+= -Wno-unused-value -Wno-parentheses
endif
ifneq (0,$(DISABLEINLINING))
BASECFLAGS+= -DDISABLE_INLINING
BASECOMMONFLAGS+= -DDISABLE_INLINING
endif
BASELDFLAGS+= $(OPTOPT)
# This should come from the environment:
ifdef EDUKE32_MY_DEVELOPER_ID
BASECFLAGS+= -DMY_DEVELOPER_ID=$(EDUKE32_MY_DEVELOPER_ID)
BASECOMMONFLAGS+= -DMY_DEVELOPER_ID=$(EDUKE32_MY_DEVELOPER_ID)
endif
ifneq (0,$(USE_LIBPNG))
BASECFLAGS+= -DUSE_LIBPNG
BASECOMMONFLAGS+= -DUSE_LIBPNG
endif
ifneq (0,$(USE_LIBVPX))
BASECFLAGS+= -DUSE_LIBVPX
BASECOMMONFLAGS+= -DUSE_LIBVPX
endif
ifneq (0,$(OSX_STARTUPWINDOW))
BASECFLAGS+= -DOSX_STARTUPWINDOW
BASECOMMONFLAGS+= -DOSX_STARTUPWINDOW
endif
ifneq (0,$(EFENCE))
LIBS+= -lefence
BASECFLAGS+= -DEFENCE
BASECOMMONFLAGS+= -DEFENCE
endif
ifneq (0,$(DMALLOC))
LIBS+= -ldmalloc
BASECFLAGS+= -DDMALLOC
BASECOMMONFLAGS+= -DDMALLOC
endif
# Misc. stuff that is constant between Makefiles

View file

@ -48,14 +48,16 @@ endif
include Makefile.shared
OURCFLAGS=$(BASECFLAGS) -Wno-char-subscripts -I$(INC)
OURCOMMONFLAGS=$(BASECOMMONFLAGS) -Wno-char-subscripts -I$(INC)
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
OURASFLAGS=$(BASEASFLAGS)
OURLDFLAGS=$(BASELDFLAGS) $(BUILDLDFLAGS)
PRINTLDFLAGS=$(BASELDFLAGS)
OURLDFLAGS=$(OURCOMMONFLAGS) $(PRINTLDFLAGS)
ifneq ($(LUNATIC),0)
OURCFLAGS+= -DLUNATIC
OURCOMMONFLAGS+= -DLUNATIC
endif
UTILLIBS= -lm # -lpthread
@ -112,14 +114,14 @@ ifeq ($(PLATFORM),DARWIN)
ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o
endif
OURASFLAGS += -f macho -DUNDERSCORES
OURCFLAGS += -fno-pic -DUNDERSCORES
OURCOMMONFLAGS += -fno-pic -DUNDERSCORES
endif
ifeq ($(PLATFORM),BSD)
OURASFLAGS+= -f elf
OURCFLAGS+= -I/usr/X11R6/include
OURCOMMONFLAGS+= -I/usr/X11R6/include
endif
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include -I$(FMODROOTWIN)/inc # -I$(ENETROOT)/include
OURCOMMONFLAGS+= -DUNDERSCORES -I$(DXROOT)/include -I$(FMODROOTWIN)/inc # -I$(ENETROOT)/include
OURASFLAGS+= -DUNDERSCORES -f win32
endif
ifeq ($(PLATFORM),BEOS)
@ -145,21 +147,21 @@ ifeq ($(RENDERTYPE),SDL)
endif
ifeq (1,$(SDL_FRAMEWORK))
OURCFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
else
OURCFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
endif
endif
ifeq (0,$(SDL_FRAMEWORK))
OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))
OURCOMMONFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))
else
OURCFLAGS += -DSDL_FRAMEWORK
OURCOMMONFLAGS += -DSDL_FRAMEWORK
endif
ifeq (1,$(HAVE_GTK2))
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
OURCOMMONFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
ENGINEOBJS+= $(OBJ)/gtkbits.$o
ifeq ($(LINKED_GTK),0)
ENGINEOBJS+= $(OBJ)/dynamicgtk.$o
@ -172,11 +174,13 @@ ifeq ($(RENDERTYPE),WIN)
EDITOROBJS+= $(OBJ)/startwin.editor.$o
endif
OURCFLAGS+= $(BUILDCFLAGS)
OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
INVOCATION=$(CC) $(OURCONLYFLAGS)
COMPILER=$(CC) $(OURCONLYFLAGS)
LINKER=$(L_CC)
ifneq ($(CPLUSPLUS),0)
INVOCATION=$(CXX) $(OURCXXFLAGS)
COMPILER=$(CXX) $(OURCXXFLAGS)
LINKER=$(L_CXX)
endif
.SILENT:
@ -239,56 +243,56 @@ $(OBJ)/$(EDITORLIB): $(EDITOROBJS)
kextract$(EXESUFFIX): $(OBJ)/kextract.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
kgroup$(EXESUFFIX): $(OBJ)/kgroup.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
transpal$(EXESUFFIX): $(OBJ)/transpal.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
wad2art$(EXESUFFIX): $(OBJ)/wad2art.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
wad2map$(EXESUFFIX): $(OBJ)/wad2map.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
kmd2tool$(EXESUFFIX): $(OBJ)/kmd2tool.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
md2tool$(EXESUFFIX): $(OBJ)/md2tool.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
generateicon$(EXESUFFIX): $(OBJ)/generateicon.$o $(OBJ)/compat.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o \
$(OBJ)/cache1d.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
cacheinfo$(EXESUFFIX): $(OBJ)/cacheinfo.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
getdxdidf$(EXESUFFIX): $(OBJ)/getdxdidf.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -ldinput; then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -ldinput; then $(ONESTEP_OK); fi
makesdlkeytrans$(EXESUFFIX): $(OBJ)/makesdlkeytrans.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(L_CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(UTILLIBS); then $(ONESTEP_OK); fi
givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
mkpalette$(EXESUFFIX): $(OBJ)/mkpalette.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
unpackssi$(EXESUFFIX): $(OBJ)/unpackssi.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
bsuite$(EXESUFFIX): $(OBJ)/bsuite.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
# DEPENDENCIES
include Makefile.deps
@ -301,15 +305,15 @@ $(OBJ)/%.$o: $(SRC)/%.nasm
# comment out to debug a-c.o
$(OBJ)/a-c.$o: $(SRC)/a-c.c
$(COMPILE_STATUS)
if $(INVOCATION) $(subst -O0,-O2,$(subst -fcatch-undefined-behavior,,$(OURCFLAGS))) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(subst -O0,-O2,$(subst -fcatch-undefined-behavior,,$(OURCFLAGS))) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.m
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.cc
$(COMPILE_STATUS)
@ -325,7 +329,7 @@ $(OBJ)/%.$o: $(SRC)/%.cxx
$(OBJ)/%.$o: $(SRC)/misc/%.c
$(COMPILE_STATUS)
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.rc
$(COMPILE_STATUS)
@ -333,7 +337,7 @@ $(OBJ)/%.$o: $(SRC)/misc/%.rc
$(OBJ)/%.$o: $(SRC)/util/%.c
$(COMPILE_STATUS)
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/util/%.cc
$(COMPILE_STATUS)
@ -349,7 +353,7 @@ $(OBJ)/%.$o: $(SRC)/util/%.cxx
$(OBJ)/%.$o: $(RSRC)/%.c
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@

View file

@ -31,8 +31,7 @@ ifeq (4,$(GCC_MAJOR))
L_SSP := -lssp
endif
BUILDCFLAGS=$(ARCH)
BUILDLDFLAGS=$(ARCH)
BUILDCOMMONFLAGS=$(ARCH)
ifeq ($(PLATFORM),LINUX)
STDCPPLIB=
@ -43,14 +42,14 @@ endif
ifeq ($(PLATFORM),LINUX)
RENDERTYPE=SDL
BUILDCFLAGS+= -DHAVE_INTTYPES
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
GTKCOMPAT32=0
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
ifeq (1,$(BUILD32_ON_64))
# On my 64bit Gentoo these are the 32bit emulation libs
LIBS+= -m32 -L/emul/linux/x86/usr/lib
BUILDCFLAGS+= -m32
BUILDCOMMONFLAGS+= -m32
# Override WITHOUT_GTK=0
GTKCOMPAT32=1
else
@ -61,12 +60,12 @@ endif
ifeq ($(PLATFORM),DARWIN)
RENDERTYPE = SDL
STDCPPLIB = -lstdc++
BUILDCFLAGS += -DHAVE_INTTYPES
BUILDCOMMONFLAGS += -DHAVE_INTTYPES
GTKCOMPAT32 = 0
SDL_FRAMEWORK = 1
ifeq (1,$(DARWIN9))
BUILDCFLAGS += -DDARWIN9
BUILDCOMMONFLAGS += -DDARWIN9
endif
ifeq (1,$(BUILD32_ON_64))
@ -78,7 +77,7 @@ ifeq ($(PLATFORM),DARWIN)
endif
ifeq ($(PLATFORM),WINDOWS)
RENDERTYPE ?= WIN
BUILDCFLAGS+= -DHAVE_INTTYPES
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
EXESUFFIX=.exe
LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 -lcomctl32
#-lshfolder
@ -86,7 +85,7 @@ ifeq ($(PLATFORM),WINDOWS)
endif
ifeq ($(PLATFORM),BSD)
RENDERTYPE=SDL
BUILDCFLAGS+= -DHAVE_INTTYPES
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
ifneq ($(findstring i386, $(SYSARCH)), i386)
override NOASM=1
endif
@ -100,9 +99,9 @@ ifeq ($(PLATFORM),SKYOS)
RENDERTYPE=SDL
EXESUFFIX=.app
override NOASM=1
BUILDCFLAGS+= -DUNDERSCORES
BUILDCOMMONFLAGS+= -DUNDERSCORES
SDLCONFIG=
SDLCONFIG_CFLAGS=-I/boot/programs/sdk/include/sdl
SDLCONFIG_COMMONFLAGS=-I/boot/programs/sdk/include/sdl
LIBS+= -lSDL -lnet
endif
ifeq ($(PLATFORM),WII)
@ -121,7 +120,7 @@ ifeq ($(PLATFORM),WII)
override NOASM=1
override WITHOUT_GTK=1
# -msdata=eabi
BUILDCFLAGS+= -g -mtune=750 -meabi -mhard-float \
BUILDCOMMONFLAGS+= -g -mtune=750 -meabi -mhard-float \
-DGEKKO -DHAVE_INTTYPES -D__POWERPC__ \
-I$(LIBOGC_INC) -I$(LIBOGC_INC)/SDL -I$(PORTLIBS)/include
SDLCONFIG=
@ -150,12 +149,12 @@ endif
ifeq ($(RENDERTYPE),SDL)
ifeq ($(SDL_FRAMEWORK),1)
LIBS += -Wl,-framework,SDL
SDLCONFIG_CFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers
SDLCONFIG_COMMONFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers
else
ifneq ($(SDLCONFIG),)
SDLCONFIG_LIBS+= $(shell $(SDLCONFIG) --libs)
LIBS+= $(SDLCONFIG_LIBS)
SDLCONFIG_CFLAGS+=$(shell $(SDLCONFIG) --cflags)
SDLCONFIG_COMMONFLAGS+=$(shell $(SDLCONFIG) --cflags)
endif
endif
@ -185,21 +184,21 @@ else
endif
BUILDCFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 $(W_STRICT_OVERFLOW)
BUILDCOMMONFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 $(W_STRICT_OVERFLOW)
ifneq (0,$(USE_OPENGL))
BUILDCFLAGS+= -DUSE_OPENGL
BUILDCOMMONFLAGS+= -DUSE_OPENGL
endif
ifneq (0,$(NOASM))
BUILDCFLAGS+= -DNOASM
BUILDCOMMONFLAGS+= -DNOASM
endif
ifneq (0,$(LINKED_GTK))
BUILDCFLAGS+= -DLINKED_GTK
BUILDCOMMONFLAGS+= -DLINKED_GTK
endif
ifneq (0,$(POLYMER))
ifneq (0,$(USE_OPENGL))
BUILDCFLAGS+= -DPOLYMER
BUILDCOMMONFLAGS+= -DPOLYMER
endif
endif
@ -227,12 +226,12 @@ ifeq ($(PLATFORM),WINDOWS)
ifneq ($(USE_LIBPNG),0)
# XXX: these assume that the compiler runs from build/. Ugh.
LIBS+= -L../Windows/lib -lpng_mini -lz_mini
BUILDCFLAGS+= -I../Windows/include
BUILDCOMMONFLAGS+= -I../Windows/include
endif
else
ifeq ($(PLATFORM),DARWIN)
ifneq ($(USE_LIBPNG),0)
BUILDCFLAGS+= -I/opt/local/include -I/sw/include -I/usr/local/include
BUILDCOMMONFLAGS+= -I/opt/local/include -I/sw/include -I/usr/local/include
LIBS+= -L/opt/local/lib -L/usr/local/lib -lpng # -lz
endif
else
@ -249,9 +248,9 @@ endif
ifeq ($(PRETTY_OUTPUT),1)
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(INVOCATION) $(OURCFLAGS)\"
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(COMPILER) $(OURCFLAGS)\"
BUILD_SETTINGS_ASSEMBLER = \033[1;36massembler: \033[0;36m\"$(AS) $(OURASFLAGS)\"
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(PRINTLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
ifeq (0,$(NOASM))
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_ASSEMBLER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
else

View file

@ -1359,7 +1359,7 @@ void dfwrite(const void *buffer, bsize_t dasizeof, bsize_t count, BFILE *fil)
dasizeof = 1;
}
ptr = buffer;
ptr = (char*)buffer;
Bmemcpy(lzwrawbuf, ptr, (int32_t)dasizeof);

View file

@ -54,19 +54,22 @@ HRESULT WINAPI ddenum(DDSURFACEDESC *ddsd, VOID *udata ATTRIBUTE((unused)))
return(DDENUMRET_OK);
}
typedef HRESULT (WINAPI *aDirectDrawCreateType)(GUID *, LPDIRECTDRAW *, IUnknown *);
typedef HRESULT (WINAPI *aDirectDrawEnumerateType)(LPDDENUMCALLBACK, LPVOID);
int InitDirectDraw(void)
{
HRESULT result;
HRESULT (WINAPI *aDirectDrawCreate)(GUID *, LPDIRECTDRAW *, IUnknown *);
HRESULT (WINAPI *aDirectDrawEnumerate)(LPDDENUMCALLBACK, LPVOID);
aDirectDrawCreateType aDirectDrawCreate;
aDirectDrawEnumerateType aDirectDrawEnumerate;
hDDrawDLL = LoadLibrary("DDRAW.DLL");
if (!hDDrawDLL) { fprintf(output, "Failed loading DDRAW.DLL\n"); return -1; }
aDirectDrawEnumerate = (void *)GetProcAddress(hDDrawDLL, "DirectDrawEnumerateA");
aDirectDrawEnumerate = (aDirectDrawEnumerateType)GetProcAddress(hDDrawDLL, "DirectDrawEnumerateA");
if (!aDirectDrawEnumerate) { fprintf(output, "Error fetching DirectDrawEnumerate\n"); return -1; }
aDirectDrawCreate = (void *)GetProcAddress(hDDrawDLL, "DirectDrawCreate");
aDirectDrawCreate = (aDirectDrawCreateType)GetProcAddress(hDDrawDLL, "DirectDrawCreate");
if (!aDirectDrawCreate) { fprintf(output, "Error fetching DirectDrawCreate\n"); return -1; }
result = aDirectDrawCreate(NULL, &lpDD, NULL);

View file

@ -165,7 +165,7 @@ int main(int argc, char **argv)
{
Bprintf("TRANSPAL [-t]<numshades><trans#(0-inv,256-opa)><r><g><b> by Kenneth Silverman\n");
Bprintf(" Ex #1: transpal 32 170 30 59 11 (I use these values in my BUILD demo)\n");
Bprintf(" ÀÄÄÁÄÄÁÄÄÄ The RGB scales are optional\n");
Bprintf(" \xc0\xc4\xc4\xc1\xc4\xc4\xc1\xc4\xc4\xc4 The RGB scales are optional\n");
Bprintf(" Ex #2: transpal 64 160\n\n");
Bprintf("Once tables are generated, the optional -t switch determines what to save:\n");
Bprintf(" Exclude -t to update both the shade table and transluscent table\n");

View file

@ -151,7 +151,7 @@ static int secval[4096], secopnum = 0;
#define THINGLISTNUM 123
static short thinglookup[MAXTHINGTYPES];
typedef struct { short num; char name[8]; } thinglisttype;
typedef struct { short num; char name[9]; } thinglisttype;
static thinglisttype thinglist[THINGLISTNUM] =
{{1,"PLAYA1"},{2,"PLAYA1"},{3,"PLAYA1"},{4,"PLAYA1"},{11,"PLAYA1"},{14,""},{3004,"POSSA1"},
{84,"SSWVA1"},{9,"SPOSA1"},{65,"CPOSA1"},{3001,"TROOA1"},{3002,"SARGA1"},{58,"SARGA1"},

View file

@ -7,19 +7,20 @@ SRC=src
INC=include
# for BUILD_ECHOFLAGS:
OURCFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) -I$(INC) -I$(SRC) -I../../$(EROOT)/include
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(SRC) -I../../$(EROOT)/include
ifneq ($(RELEASE),0)
# Debugging disabled
debug+= $(F_NO_STACK_PROTECTOR)
endif
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
OURLDFLAGS=$(BASELDFLAGS)
PRINTLDFLAGS=$(BASELDFLAGS)
OURASFLAGS=$(BASEASFLAGS)
INVOCATION=$(CC) $(OURCONLYFLAGS)
COMPILER=$(CC) $(OURCONLYFLAGS)
ifneq ($(CPLUSPLUS),0)
INVOCATION=$(CXX) $(OURCXXFLAGS)
COMPILER=$(CXX) $(OURCXXFLAGS)
endif
@ -49,7 +50,7 @@ $(OBJNAME): $(OBJECTS)
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
-mkdir -p $(OBJ)
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
ifeq ($(PRETTY_OUTPUT),1)
.SILENT:

View file

@ -15,30 +15,31 @@ else
endif
# for BUILD_ECHOFLAGS:
OURCFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) -I$(INC) -I$(SRC)
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(SRC)
ifneq ($(PLATFORM),WII)
OURCFLAGS+= -DHAVE_VORBIS
OURCOMMONFLAGS+= -DHAVE_VORBIS
endif
ifneq ($(RELEASE),0)
# Debugging disabled
debug+= $(F_NO_STACK_PROTECTOR)
endif
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
OURLDFLAGS=$(BASELDFLAGS)
PRINTLDFLAGS=$(BASELDFLAGS)
OURASFLAGS=$(BASEASFLAGS)
ifeq ($(PLATFORM),DARWIN)
ifeq (1,$(SDL_FRAMEWORK))
APPLE_INCLUDE_DIR:=../../Apple/include
OURCFLAGS += -DSDL_FRAMEWORK -I$(APPLE_INCLUDE_DIR) -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
OURCOMMONFLAGS += -DSDL_FRAMEWORK -I$(APPLE_INCLUDE_DIR) -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
endif
endif
INVOCATION=$(CC) $(OURCONLYFLAGS)
COMPILER=$(CC) $(OURCONLYFLAGS)
ifneq ($(CPLUSPLUS),0)
INVOCATION=$(CXX) $(OURCXXFLAGS)
COMPILER=$(CXX) $(OURCXXFLAGS)
endif
@ -52,14 +53,14 @@ OBJECTS=$(OBJ)/drivers.o \
$(OBJ)/driver_nosound.o
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
OURCOMMONFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
OBJECTS+= $(OBJ)/driver_directsound.o
OBJNAME=libjfaudiolib_win32.a
OBJ=obj_win
else
OURCFLAGS+= -DHAVE_SDL $(SDLCONFIG_CFLAGS)
OURCOMMONFLAGS+= -DHAVE_SDL $(SDLCONFIG_COMMONFLAGS)
ifneq ($(PLATFORM),DARWIN)
OURCFLAGS+=`pkg-config --cflags vorbis`
OURCOMMONFLAGS+=`pkg-config --cflags vorbis`
endif
OBJECTS+= $(OBJ)/driver_sdl.o
endif
@ -74,7 +75,7 @@ $(OBJNAME): $(OBJECTS)
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
-mkdir -p $(OBJ)
$(COMPILE_STATUS)
if $(INVOCATION) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
ifeq ($(PRETTY_OUTPUT),1)
.SILENT: