mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-23 02:40:26 +01:00
Updated Makefile to (maybe) build this on a modern Mac.
This commit is contained in:
parent
24cb244d43
commit
e564f155e5
|
@ -6,10 +6,15 @@
|
||||||
# Intel compiler < version 6.0 probably won't work.
|
# Intel compiler < version 6.0 probably won't work.
|
||||||
#CC := icc
|
#CC := icc
|
||||||
#LINKER := icc
|
#LINKER := icc
|
||||||
CC := gcc
|
#CC := gcc
|
||||||
CXX := g++
|
#CXX := g++
|
||||||
LINKER := g++
|
#LINKER := g++
|
||||||
LIBLINKER := g++
|
#LIBLINKER := g++
|
||||||
|
|
||||||
|
CC := clang
|
||||||
|
CXX := clang++
|
||||||
|
LINKER := clang++
|
||||||
|
LIBLINKER := clang++
|
||||||
|
|
||||||
#arch := $(shell uname -m)
|
#arch := $(shell uname -m)
|
||||||
|
|
||||||
|
@ -422,16 +427,16 @@ SHADERSOBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
|
||||||
SHADERSSRCS := $(foreach f,$(SHADERSSRCS),$(SRCDIR)/$(f))
|
SHADERSSRCS := $(foreach f,$(SHADERSSRCS),$(SRCDIR)/$(f))
|
||||||
|
|
||||||
|
|
||||||
GAMESRCS := Game/Camera.cpp Game/CompMessage.cpp Game/CompModels.cpp \
|
#GAMESRCS := Game/Camera.cpp Game/CompMessage.cpp Game/CompModels.cpp \
|
||||||
Game/Computer.cpp Game/Console.cpp Game/Controls.cpp \
|
# Game/Computer.cpp Game/Console.cpp Game/Controls.cpp \
|
||||||
Game/Game.cpp Game/LCDDrawing.cpp Game/LoadingHook.cpp \
|
# Game/Game.cpp Game/LCDDrawing.cpp Game/LoadingHook.cpp \
|
||||||
Game/Map.cpp Game/SessionProperties.cpp Game/WEDInterface.cpp
|
# Game/Map.cpp Game/SessionProperties.cpp Game/WEDInterface.cpp
|
||||||
|
#
|
||||||
OBJS1 := $(GAMESRCS:.c=.o)
|
#OBJS1 := $(GAMESRCS:.c=.o)
|
||||||
OBJS2 := $(OBJS1:.cpp=.o)
|
#OBJS2 := $(OBJS1:.cpp=.o)
|
||||||
OBJS3 := $(OBJS2:.asm=.o)
|
#OBJS3 := $(OBJS2:.asm=.o)
|
||||||
GAMEOBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
|
#GAMEOBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
|
||||||
GAMESRCS := $(foreach f,$(GAMESRCS),$(SRCDIR)/$(f))
|
#GAMESRCS := $(foreach f,$(GAMESRCS),$(SRCDIR)/$(f))
|
||||||
|
|
||||||
|
|
||||||
GAMEMPSRCS := GameMP/Camera.cpp GameMP/CompMessage.cpp GameMP/CompModels.cpp \
|
GAMEMPSRCS := GameMP/Camera.cpp GameMP/CompMessage.cpp GameMP/CompModels.cpp \
|
||||||
|
@ -445,23 +450,23 @@ OBJS3 := $(OBJS2:.asm=.o)
|
||||||
GAMEMPOBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
|
GAMEMPOBJS := $(foreach f,$(OBJS3),$(BINDIR)/$(f))
|
||||||
GAMEMPSRCS := $(foreach f,$(GAMEMPSRCS),$(SRCDIR)/$(f))
|
GAMEMPSRCS := $(foreach f,$(GAMEMPSRCS),$(SRCDIR)/$(f))
|
||||||
|
|
||||||
ENTITYFILES := $(wildcard Entities/*.es)
|
#ENTITYFILES := $(wildcard Entities/*.es)
|
||||||
ENTITYHEADERS := $(ENTITYFILES:.es=.h)
|
#ENTITYHEADERS := $(ENTITYFILES:.es=.h)
|
||||||
ENTITYTABLES := $(ENTITYFILES:.es=_tables.h)
|
#ENTITYTABLES := $(ENTITYFILES:.es=_tables.h)
|
||||||
ENTITYSRCS := $(ENTITYHEADERS:.h=.cpp)
|
#ENTITYSRCS := $(ENTITYHEADERS:.h=.cpp)
|
||||||
|
#
|
||||||
ENTITYCOMMONSRCS := Entities/Common/Common.cpp Entities/Common/Particles.cpp \
|
#ENTITYCOMMONSRCS := Entities/Common/Common.cpp Entities/Common/Particles.cpp \
|
||||||
Entities/Common/PathFinding.cpp Entities/Common/HUD.cpp
|
# Entities/Common/PathFinding.cpp Entities/Common/HUD.cpp
|
||||||
|
|
||||||
# These file are empty right now. ?
|
# These file are empty right now. ?
|
||||||
#ENTITYCOMMONSRCS += Entities/Common/Stats.cpp
|
#ENTITYCOMMONSRCS += Entities/Common/Stats.cpp
|
||||||
#ENTITYCOMMONSRCS += Entities/Common/Debris.cpp
|
#ENTITYCOMMONSRCS += Entities/Common/Debris.cpp
|
||||||
|
|
||||||
ENTITYHEADERS := $(foreach f,$(ENTITYHEADERS),$(SRCDIR)/$(f))
|
#ENTITYHEADERS := $(foreach f,$(ENTITYHEADERS),$(SRCDIR)/$(f))
|
||||||
|
|
||||||
OBJS1 := $(ENTITYSRCS:.cpp=.o) $(ENTITYCOMMONSRCS:.cpp=.o)
|
#OBJS1 := $(ENTITYSRCS:.cpp=.o) $(ENTITYCOMMONSRCS:.cpp=.o)
|
||||||
ENTITYOBJS := $(foreach f,$(OBJS1),$(BINDIR)/$(f))
|
#ENTITYOBJS := $(foreach f,$(OBJS1),$(BINDIR)/$(f))
|
||||||
ENTITYSRCS := $(foreach f,$(ENTITYSRCS),$(SRCDIR)/$(f))
|
#ENTITYSRCS := $(foreach f,$(ENTITYSRCS),$(SRCDIR)/$(f))
|
||||||
|
|
||||||
|
|
||||||
ENTITYMPFILES := $(wildcard EntitiesMP/*.es)
|
ENTITYMPFILES := $(wildcard EntitiesMP/*.es)
|
||||||
|
@ -511,15 +516,15 @@ else
|
||||||
DLLEXT := so
|
DLLEXT := so
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(debug)),true)
|
ifeq ($(strip $(debug)),true)
|
||||||
ENTITYDLL := $(BINDIR)/libEntitiesD.$(DLLEXT)
|
#ENTITYDLL := $(BINDIR)/libEntitiesD.$(DLLEXT)
|
||||||
ENTITYMPDLL := $(BINDIR)/libEntitiesMPD.$(DLLEXT)
|
ENTITYMPDLL := $(BINDIR)/libEntitiesMPD.$(DLLEXT)
|
||||||
GAMEDLL := $(BINDIR)/libGameD.$(DLLEXT)
|
#GAMEDLL := $(BINDIR)/libGameD.$(DLLEXT)
|
||||||
GAMEMPDLL := $(BINDIR)/libGameMPD.$(DLLEXT)
|
GAMEMPDLL := $(BINDIR)/libGameMPD.$(DLLEXT)
|
||||||
SHADERSDLL := $(BINDIR)/libShadersD.$(DLLEXT)
|
SHADERSDLL := $(BINDIR)/libShadersD.$(DLLEXT)
|
||||||
else
|
else
|
||||||
ENTITYDLL := $(BINDIR)/libEntities.$(DLLEXT)
|
#ENTITYDLL := $(BINDIR)/libEntities.$(DLLEXT)
|
||||||
ENTITYMPDLL := $(BINDIR)/libEntitiesMP.$(DLLEXT)
|
ENTITYMPDLL := $(BINDIR)/libEntitiesMP.$(DLLEXT)
|
||||||
GAMEDLL := $(BINDIR)/libGame.$(DLLEXT)
|
#GAMEDLL := $(BINDIR)/libGame.$(DLLEXT)
|
||||||
GAMEMPDLL := $(BINDIR)/libGameMP.$(DLLEXT)
|
GAMEMPDLL := $(BINDIR)/libGameMP.$(DLLEXT)
|
||||||
SHADERSDLL := $(BINDIR)/libShaders.$(DLLEXT)
|
SHADERSDLL := $(BINDIR)/libShaders.$(DLLEXT)
|
||||||
endif
|
endif
|
||||||
|
@ -573,8 +578,8 @@ endif
|
||||||
CFLAGS += -IExternal/SDL12
|
CFLAGS += -IExternal/SDL12
|
||||||
CFLAGS += $(USE_ASM) -I$(SRCDIR) -D_REENTRANT -DPLATFORM_UNIX -D_MT
|
CFLAGS += $(USE_ASM) -I$(SRCDIR) -D_REENTRANT -DPLATFORM_UNIX -D_MT
|
||||||
ifeq ($(strip $(macosx)),true)
|
ifeq ($(strip $(macosx)),true)
|
||||||
CFLAGS += -DPLATFORM_MACOSX
|
CFLAGS += -DPLATFORM_MACOSX -arch i386
|
||||||
CXXFLAGS += -Wno-invalid-offsetof
|
CXXFLAGS += -Wno-invalid-offsetof -arch i386
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(CC)),icc)
|
ifeq ($(strip $(CC)),icc)
|
||||||
|
@ -592,7 +597,8 @@ else
|
||||||
# !!! FIXME: Get -Wall in here, some day.
|
# !!! FIXME: Get -Wall in here, some day.
|
||||||
# !!! FIXME: Get -Werror back in here for gcc3, some day.
|
# !!! FIXME: Get -Werror back in here for gcc3, some day.
|
||||||
CFLAGS += $(USE_ASM) -I$(SRCDIR) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
|
CFLAGS += $(USE_ASM) -I$(SRCDIR) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
|
||||||
CXXFLAGS += -Wno-non-template-friend -fexceptions -frtti
|
#CXXFLAGS += -Wno-non-template-friend -fexceptions -frtti
|
||||||
|
CXXFLAGS += -fexceptions -frtti
|
||||||
CFLAGS += -D_MT -fno-omit-frame-pointer
|
CFLAGS += -D_MT -fno-omit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -657,7 +663,7 @@ else
|
||||||
endif
|
endif
|
||||||
DLLLDFLAGS := $(PICFLAG) $(LDFLAGS)
|
DLLLDFLAGS := $(PICFLAG) $(LDFLAGS)
|
||||||
ifeq ($(strip $(macosx)),true)
|
ifeq ($(strip $(macosx)),true)
|
||||||
DLLLDFLAGS += -dynamiclib -undefined dynamic_lookup
|
DLLLDFLAGS += -dynamiclib -undefined dynamic_lookup -arch i386
|
||||||
else
|
else
|
||||||
DLLLDFLAGS += -shared
|
DLLLDFLAGS += -shared
|
||||||
endif
|
endif
|
||||||
|
@ -674,7 +680,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(macosx)),true)
|
ifeq ($(strip $(macosx)),true)
|
||||||
LDFLAGS := -framework Cocoa -framework OpenGL
|
LDFLAGS := -framework Cocoa -framework OpenGL -arch i386
|
||||||
else
|
else
|
||||||
LDFLAGS += -rdynamic -lm -ldl
|
LDFLAGS += -rdynamic -lm -ldl
|
||||||
endif
|
endif
|
||||||
|
@ -699,8 +705,8 @@ CXXFLAGS += $(CFLAGS)
|
||||||
$(ECCEXE) $<
|
$(ECCEXE) $<
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(BINDIR)/Entities/%.o: $(SRCDIR)/Entities/%.cpp
|
#$(BINDIR)/Entities/%.o: $(SRCDIR)/Entities/%.cpp
|
||||||
$(CXX) -c -o $@ $< -I$(dir $<)StdH $(CXXFLAGS)
|
# $(CXX) -c -o $@ $< -I$(dir $<)StdH $(CXXFLAGS)
|
||||||
|
|
||||||
$(BINDIR)/EntitiesMP/%.o: $(SRCDIR)/EntitiesMP/%.cpp
|
$(BINDIR)/EntitiesMP/%.o: $(SRCDIR)/EntitiesMP/%.cpp
|
||||||
$(CXX) -c -o $@ $< -I$(dir $<)StdH $(CXXFLAGS)
|
$(CXX) -c -o $@ $< -I$(dir $<)StdH $(CXXFLAGS)
|
||||||
|
@ -750,14 +756,14 @@ $(SDLMAINLIB) : lib/macosx_x86/libSDLmain.a $(BINDIR)
|
||||||
ranlib $@
|
ranlib $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(ENTITYDLL): $(ENTITYHEADERS) $(ENTITYOBJS)
|
#$(ENTITYDLL): $(ENTITYHEADERS) $(ENTITYOBJS)
|
||||||
$(LIBLINKER) $(DLLLDFLAGS) -o $(ENTITYDLL) $(ENTITYOBJS) $(EFENCELIB)
|
# $(LIBLINKER) $(DLLLDFLAGS) -o $(ENTITYDLL) $(ENTITYOBJS) $(EFENCELIB)
|
||||||
|
|
||||||
$(ENTITYMPDLL): $(ENTITYMPHEADERS) $(ENTITYMPOBJS)
|
$(ENTITYMPDLL): $(ENTITYMPHEADERS) $(ENTITYMPOBJS)
|
||||||
$(LIBLINKER) $(DLLLDFLAGS) -o $(ENTITYMPDLL) $(ENTITYMPOBJS) $(EFENCELIB)
|
$(LIBLINKER) $(DLLLDFLAGS) -o $(ENTITYMPDLL) $(ENTITYMPOBJS) $(EFENCELIB)
|
||||||
|
|
||||||
$(GAMEDLL): $(GAMEOBJS)
|
#$(GAMEDLL): $(GAMEOBJS)
|
||||||
$(LIBLINKER) $(DLLLDFLAGS) -o $(GAMEDLL) $(GAMEOBJS) $(EFENCELIB)
|
# $(LIBLINKER) $(DLLLDFLAGS) -o $(GAMEDLL) $(GAMEOBJS) $(EFENCELIB)
|
||||||
|
|
||||||
$(GAMEMPDLL): $(GAMEMPOBJS)
|
$(GAMEMPDLL): $(GAMEMPOBJS)
|
||||||
$(LIBLINKER) $(DLLLDFLAGS) -o $(GAMEMPDLL) $(GAMEMPOBJS) $(EFENCELIB)
|
$(LIBLINKER) $(DLLLDFLAGS) -o $(GAMEMPDLL) $(GAMEMPOBJS) $(EFENCELIB)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user