Makefiles:

- Properly handle the architecture definition when BUILD32_ON_64=1
 - Add proper $(*LDFLAGS) to which LTO and ARCH are correctly passed.
 - Cleanup of compiler flag variables.

This should fix to some degree building of the Build tools on OS X, and it may possibly fix the crashing of the OS X x86 32-bit build.

git-svn-id: https://svn.eduke32.com/eduke32@2520 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-03-23 20:22:10 +00:00
parent d51d9a0fb8
commit 64595adfb2
6 changed files with 80 additions and 73 deletions

View file

@ -40,9 +40,8 @@ OURCFLAGS=$(BASECFLAGS) \
OURCXXFLAGS=$(BASECXXFLAGS)
OURCONLYFLAGS=$(BASECONLYFLAGS)
NASMFLAGS=$(BASEASFLAGS)
MISCLINKOPTS=
OURASFLAGS=$(BASEASFLAGS)
OURLDFLAGS=$(BASELDFLAGS) $(BUILDLDFLAGS)
JAUDIOLIBDIR=$(SRC)/jaudiolib
@ -168,14 +167,14 @@ ifneq (0,$(LUNATIC))
STRIP+= -s $(SRC)/lunatic/dynsymlist_osx
MISCGAMEDEPS+= $(SRC)/lunatic/dynsymlist_osx
MISCLINKOPTS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(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
endif
ifeq ($(PLATFORM),WINDOWS)
MISCGAMEDEPS+= $(SRC)/lunatic/eduke32.def
MISCLINKOPTS+= $(SRC)/lunatic/eduke32.def
OURLDFLAGS+= $(SRC)/lunatic/eduke32.def
endif
ifeq ($(PLATFORM),LINUX)
MISCLINKOPTS+= -Wl,--dynamic-list=$(SRC)/lunatic/dynsymlist
OURLDFLAGS+= -Wl,--dynamic-list=$(SRC)/lunatic/dynsymlist
endif
endif
@ -186,7 +185,7 @@ ifeq ($(PLATFORM),LINUX)
ifneq ($(CC),clang)
OURCFLAGS += -fno-pic
endif
NASMFLAGS += -f elf
OURASFLAGS += -f elf
LIBS += -lvorbisfile -lvorbis -logg
endif
@ -217,12 +216,12 @@ ifeq ($(PLATFORM),DARWIN)
# EDITOROBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o
GAMEOBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o
endif
NASMFLAGS += -f macho
OURASFLAGS += -f macho
endif
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS += -fno-pic -DUNDERSCORES -I$(DXROOT)/include
NASMFLAGS+= -DUNDERSCORES -f win32
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
EDITOROBJS+= $(OBJ)/buildres.$o
@ -253,17 +252,17 @@ endif
OURCFLAGS+= $(BUILDCFLAGS)
ifeq ($(PLATFORM),WINDOWS)
MISCLINKOPTS+= -Wl,--large-address-aware
OURLDFLAGS+= -Wl,--large-address-aware
endif
#ifneq (0,$(KRANDDEBUG))
ifeq ($(PLATFORM),DARWIN)
MISCLINKOPTS+=-Wl,-map -Wl,$@.memmap
OURLDFLAGS+=-Wl,-map -Wl,$@.memmap
else
MISCLINKOPTS+=-Wl,-Map=$@.memmap
OURLDFLAGS+=-Wl,-Map=$@.memmap
endif
#endif
ifneq (0,$(PROFILER))
MISCLINKOPTS+=-pg
OURLDFLAGS+=-pg
endif
ifeq ($(PRETTY_OUTPUT),1)
@ -285,7 +284,7 @@ notice:
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB) $(MISCGAMEDEPS)
$(LINK_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY))
$(STRIP) eduke32$(EXESUFFIX)
@ -299,7 +298,7 @@ endif
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
$(LINK_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY))
$(STRIP) mapster32$(EXESUFFIX)
@ -355,15 +354,15 @@ $(EBACKTRACEDLL): Windows/src/backtrace.c
$(OBJ)/%.$o: $(SRC)/%.nasm
$(COMPILE_STATUS)
$(AS) $(NASMFLAGS) $< -o $@
$(AS) $(OURASFLAGS) $< -o $@
$(OBJ)/%.$o: $(SRC)/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/lunatic/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(SRC)/lunatic/dynsymlist_osx: $(SRC)/lunatic/dynsymlist
sed 's/[{};]//g;s/[A-Za-z_][A-Za-z_0-9]*/_&/g' $< > $@
@ -377,7 +376,7 @@ $(SRC)/lunatic/eduke32.def: $(SRC)/lunatic/dynsymlist
$(OBJ)/%.$o: Apple/%.m
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.cc
$(COMPILE_STATUS)
@ -393,7 +392,7 @@ $(OBJ)/%.$o: $(SRC)/%.cxx
$(OBJ)/%.$o: $(SRC)/jmact/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.rc
$(COMPILE_STATUS)
@ -401,19 +400,19 @@ $(OBJ)/%.$o: $(SRC)/misc/%.rc
$(OBJ)/%.$o: $(SRC)/util/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(RSRC)/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(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

@ -86,6 +86,11 @@ ifneq (0,$(CLANG))
endif
# compiler flags etc.
BASECONLYFLAGS=-Wimplicit
BASECXXFLAGS= -fno-exceptions -fno-rtti
BASEASFLAGS=-s #-g
BASELDFLAGS=
LIBS=-lm
ifneq (0,$(USE_LIBPNG))
LIBS+= -lpng
@ -115,7 +120,7 @@ ifneq (0,$(RELEASE))
debug+= -fomit-frame-pointer -DNDEBUG
endif
ifneq (0,$(LTO))
LIBS+= -flto
BASELDFLAGS+= -flto
debug+= -DUSING_LTO -flto
endif
else
@ -186,11 +191,6 @@ ifneq (0,$(DMALLOC))
BASECFLAGS+= -DDMALLOC
endif
BASECONLYFLAGS=-Wimplicit
BASECXXFLAGS= -fno-exceptions -fno-rtti
BASEASFLAGS=-s #-g
# Misc. stuff that is constant between Makefiles
EROOT:=build

View file

@ -47,17 +47,18 @@ else
LIBS+= $(L_SSP) -Wl,--enable-auto-import
endif
OURCFLAGS=$(BASECFLAGS) -Wno-char-subscripts -I$(INC) $(ARCH)
include Makefile.shared
OURCFLAGS=$(BASECFLAGS) -Wno-char-subscripts -I$(INC)
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
ASFLAGS=$(BASEASFLAGS)
OURASFLAGS=$(BASEASFLAGS)
OURLDFLAGS=$(BASELDFLAGS) $(BUILDLDFLAGS)
ifneq ($(LUNATIC),0)
OURCFLAGS+= -DLUNATIC_ENABLE
endif
include Makefile.shared
UTILLIBS= # -lpthread
UTILADDOBJS=
ifneq (0,$(NEDMALLOC))
@ -124,31 +125,31 @@ EDITOROBJS=$(OBJ)/build.$o \
# PLATFORM SPECIFIC SETTINGS
ifeq ($(PLATFORM),LINUX)
ASFLAGS+= -f elf
OURASFLAGS+= -f elf
endif
ifeq ($(PLATFORM),DARWIN)
ENGINEOBJS += $(OBJ)/osxbits.$o
ifneq (0,$(OSX_STARTUPWINDOW))
ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o
endif
ASFLAGS += -f macho -DUNDERSCORES
OURASFLAGS += -f macho -DUNDERSCORES
OURCFLAGS += -fno-pic -DUNDERSCORES
endif
ifeq ($(PLATFORM),BSD)
ASFLAGS+= -f elf
OURASFLAGS+= -f elf
OURCFLAGS+= -I/usr/X11R6/include
endif
ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -DUNDERSCORES -I$(DXROOT)/include -I$(FMODROOTWIN)/inc # -I$(ENETROOT)/include
LIBS+= -lwsock32 -lws2_32 -lwinmm #-L$(ENETROOT)
ASFLAGS+= -DUNDERSCORES -f win32
OURASFLAGS+= -DUNDERSCORES -f win32
endif
ifeq ($(PLATFORM),BEOS)
ASFLAGS+= -f elf
OURASFLAGS+= -f elf
TARGETOPTS+= -DNOASM
endif
ifeq ($(PLATFORM),SYLLABLE)
ASFLAGS+= -f elf
OURASFLAGS+= -f elf
endif
ifeq ($(RENDERTYPE),SDL)
@ -213,47 +214,47 @@ $(OBJ)/$(EDITORLIB): $(EDITOROBJS)
kextract$(EXESUFFIX): $(OBJ)/kextract.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -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 $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi
arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CXX) -o $@ $^ $(STATICSTDCPP) $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(UTILLIBS); then $(ONESTEP_OK); fi
givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
mkpalette$(EXESUFFIX): $(OBJ)/mkpalette.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
unpackssi$(EXESUFFIX): $(OBJ)/unpackssi.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
bsuite$(EXESUFFIX): $(OBJ)/bsuite.$o $(UTILADDOBJS)
$(ONESTEP_STATUS)
if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi
if $(CC) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); fi
# DEPENDENCIES
include Makefile.deps
@ -261,15 +262,15 @@ include Makefile.deps
# RULES
$(OBJ)/%.$o: $(SRC)/%.nasm
$(COMPILE_STATUS)
if $(AS) $(ASFLAGS) $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(AS) $(OURASFLAGS) $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.m
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.cc
$(COMPILE_STATUS)
@ -285,7 +286,7 @@ $(OBJ)/%.$o: $(SRC)/%.cxx
$(OBJ)/%.$o: $(SRC)/misc/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/misc/%.rc
$(COMPILE_STATUS)
@ -293,7 +294,7 @@ $(OBJ)/%.$o: $(SRC)/misc/%.rc
$(OBJ)/%.$o: $(SRC)/util/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/util/%.cc
$(COMPILE_STATUS)
@ -309,7 +310,7 @@ $(OBJ)/%.$o: $(SRC)/util/%.cxx
$(OBJ)/%.$o: $(RSRC)/%.c
$(COMPILE_STATUS)
if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(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

@ -15,7 +15,6 @@ SDL_FRAMEWORK = 0
# Overridden for OSes that don't have the cutdown stdc++ that is supc++
STDCPPLIB=-lsupc++
BUILDCFLAGS=
# GCC version, for conditional selection of flags.
# This is easier than trying to squeeze it out of gcc --version:
@ -41,6 +40,9 @@ ifndef ARCH
endif
endif
BUILDCFLAGS=$(ARCH)
BUILDLDFLAGS=$(ARCH)
# Detect the platform if it wasn't explicitly given to us from
# the outside world. This allows cross-compilation by overriding
# CC and giving us PLATFORM specifically.
@ -113,7 +115,8 @@ ifeq ($(PLATFORM),DARWIN)
endif
ifeq (1,$(BUILD32_ON_64))
BUILDCFLAGS += $(F_NO_STACK_PROTECTOR) -arch i386
BUILDCFLAGS += $(F_NO_STACK_PROTECTOR)
ARCH=-arch i386
else
ifeq ($(findstring ppc,$(ARCH)),ppc)
BUILDCFLAGS += $(F_NO_STACK_PROTECTOR)

View file

@ -6,12 +6,14 @@ OBJNAME=libenet.a
SRC=src
INC=include
CFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) $(F_NO_STACK_PROTECTOR)
# for BUILD_ECHOFLAGS:
OURCFLAGS=$(CFLAGS)
OURCFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) -I$(INC) -I$(SRC) -I../../$(EROOT)/include
ifneq ($(RELEASE),0)
# Debugging disabled
debug+= $(F_NO_STACK_PROTECTOR)
endif
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
CPPFLAGS=-I$(INC) -I$(SRC) -I../../$(EROOT)/include
OBJECTS=$(OBJ)/callbacks.o \
@ -40,7 +42,7 @@ $(OBJNAME): $(OBJECTS)
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
-mkdir -p $(OBJ)
$(COMPILE_STATUS)
if $(CC) $(CPPFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
ifeq ($(PRETTY_OUTPUT),1)
.SILENT:

View file

@ -14,12 +14,14 @@ else
#DXROOT ?= c:/sdks/directx/dx8
endif
CFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) $(F_NO_STACK_PROTECTOR)
# for BUILD_ECHOFLAGS:
OURCFLAGS=$(CFLAGS)
OURCFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) -I$(INC) -I$(SRC) -DHAVE_VORBIS
ifneq ($(RELEASE),0)
# Debugging disabled
debug+= $(F_NO_STACK_PROTECTOR)
endif
OURCONLYFLAGS=$(BASECONLYFLAGS)
OURCXXFLAGS=$(BASECXXFLAGS)
CPPFLAGS=-I$(INC) -I$(SRC) -DHAVE_VORBIS
ifeq ($(PLATFORM),DARWIN)
ifeq (1,$(SDL_FRAMEWORK))
@ -40,14 +42,14 @@ OBJECTS=$(OBJ)/drivers.o \
$(OBJ)/driver_nosound.o
ifeq ($(PLATFORM),WINDOWS)
CPPFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
OURCFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
OBJECTS+= $(OBJ)/driver_directsound.o
OBJNAME=libjfaudiolib_win32.a
OBJ=obj_win
else
CPPFLAGS+= -DHAVE_SDL
OURCFLAGS+= -DHAVE_SDL
ifneq ($(PLATFORM),DARWIN)
CPPFLAGS+=`pkg-config --cflags vorbis`
OURCFLAGS+=`pkg-config --cflags vorbis`
endif
OBJECTS+= $(OBJ)/driver_sdl.o
endif
@ -62,7 +64,7 @@ $(OBJNAME): $(OBJECTS)
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
-mkdir -p $(OBJ)
$(COMPILE_STATUS)
if $(CC) $(CPPFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
ifeq ($(PRETTY_OUTPUT),1)
.SILENT: