• Chatbox

    You don't have permission to chat.
    Load More
  • 0
ButchGraig

COMPILAR SOURCE-NÃO CRIA ARQUIVOS

Question

Quando tento compilar a game no final diz que o arquivo esta no diretório XXXX mas na verdade não esta criando o arquivo.

Share this post


Link to post
Share on other sites

13 answers to this question

  • 0
Em 20/05/2020 at 16:16, ButchGraig disse:

up

 

Em 18/05/2020 at 18:41, ButchGraig disse:

Quando tento compilar a game no final diz que o arquivo esta no diretório XXXX mas na verdade não esta criando o arquivo.

envia makefile do game

Share this post


Link to post
Share on other sites
  • 0
Em 20/05/2020 at 12:24, @Metin2 disse:

de mais detalhes..

quando compilo, no final tenho esta mensagem:

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

15 horas atrás, Theji disse:

 

envia makefile do game

CC = g++

GAME_VERSION := $(shell cat ../../__REVISION__)

GccMajorVersion := $(shell expr `$(CC) -dumpversion | cut -f1 -d.`)
GccMinorVersion := $(shell expr `$(CC) -dumpversion | cut -f2 -d.`)
GccMinorEGT8 := $(shell expr $(GccMinorVersion) \>= 8)

INCDIR =
LIBDIR =
BINDIR = ../../../../ProjetoGame/srv1/share/bin
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 1
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_2_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_NEWSTUFF_EX = 0
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm -lmd

# Project Flags
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG

ifeq ($(GccMinorEGT8), 1)
CFLAGS += -Wno-unused-local-typedefs
endif

# FreeBSD stack protector
CFLAGS += -fstack-protector-all

# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__GAME_VERSION__=\"$(GAME_VERSION)\"

# Boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
        ../../../Extern/lib/libjasper.a\
        ../../../Extern/lib/libpng.a\
        ../../../Extern/lib/libtiff.a\
        ../../../Extern/lib/libjbig.a\
        ../../../Extern/lib/libmng.a\
        /usr/lib/liblzma.a\
        ../../../Extern/lib/liblcms.a\
        ../../../Extern/lib/libjpeg.a

# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a

# CryptoPP
LIBS += ../../../Extern/lib/libcryptopp.a

# GTest
ifeq ($(ENABLE_GOOGLE_TEST), 1)
LIBS += /usr/local/lib/libgtest.a
CFLAGS += -DENABLE_GOOGLE_TEST
endif

# HackShield
ifeq ($(ENABLE_HSHIELD_SYSTEM), 1)
INCDIR += -I../../libhackshield/include
LIBDIR += -L../../libhackshield/lib
LIBS   += -lanticpxsvr_st
CFLAGS += -DENABLE_HSHIELD_SYSTEM
endif

# XTrap
ifeq ($(ENABLE_XTRAP_SYSTEM), 1)
INCDIR += -I../../libxtrap/include
CFLAGS += -DENABLE_XTRAP_SYSTEM
endif

# OpenSSL
INCDIR += -I/usr/include
LIBS += -lssl
# LIBS += /usr/lib/libssl.a /usr/lib/libssh_p.a

# Lua
CFLAGS += -DENABLE_LUA_5_2_VERSION=ENABLE_LUA_5_2_VERSION
ifeq ($(ENABLE_LUA_5_2_VERSION), 1)
INCDIR += -I../../liblua/.lua52/install/include
LIBDIR += -L../../liblua/.lua52/install/lib
LIBS += ../../liblua/.lua52/install/lib/liblua.a
# LIBS += ../../liblua/.lua52/src/liblua.a
else
INCDIR += -I../../liblua/.lua50/include
LIBDIR += -L../../liblua/.lua50/lib
LIBS += ../../liblua/.lua50/lib/liblua.a ../../liblua/.lua50/lib/liblualib.a
endif

# Project Libraries
INCDIR += -I../../../Extern/include
INCDIR += -I/usr/local/include
LIBDIR += -L/usr/local/lib

INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../libserverkey
LIBS += -lthecore -lpoly -lsql -lgame -lserverkey

# PROJECT_SRC_FILES BEGIN
MAINCPP = main.cpp
TESTCPP = test.cpp

CFILE    = minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
    arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
    char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
    char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
    cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
    desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
    entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
    guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
    input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
    item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
    locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
    messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
    party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
    questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
    questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
    questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
    questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
    questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
    refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
    skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
    wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
    BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
    HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
    SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
    auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
    buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
    group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
    shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp shutdown_manager.cpp\
    item_combination.cpp\
    exp_event_manager.cpp\
    MeleyLair.cpp\
    TempleOchao.cpp\
    questlua_MeleyLair.cpp\
    questlua_TempleOchao.cpp\
    char_cards.cpp\
    char_fishs.cpp\
    combat_zone.cpp\
    empire_monument.cpp

ifeq ($(ENABLE_NEWSTUFF_EX), 1)
CPPFILE += questlua_new.cpp\
    questlua_new_constant.cpp\
    questlua_new_desc.cpp\
    questlua_new_item.cpp\
    questlua_new_npc.cpp\
    questlua_new_pc.cpp\
    questlua_new_quest.cpp\
    questlua_new_test.cpp
CFLAGS += -DENABLE_NEWSTUFF_EX=ENABLE_NEWSTUFF_EX
endif
# PROJECT_SRC_FILES END

# PROJECT_OBJ_FILES BEGIN
COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CDEPS    = $(COBJS:%.o=%.d)
CPPDEPS    = $(CPPOBJS:%.o=%.d)
endif

MAINOBJ = $(MAINCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
MAINDEPS = $(MAINOBJ:%.o=%.d)
endif

TESTOBJ = $(TESTCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
TESTDEPS = $(TESTOBJ:%.o=%.d)
endif
# PROJECT_OBJ_FILES END

# Target Paths
# MAIN_TARGET = $(BINDIR)/game_r$(GAME_VERSION)
MAIN_TARGET = $(BINDIR)/game
TEST_TARGET = $(BINDIR)/game_r$(GAME_VERSION)_test

# previously -> default: $(MAIN_TARGET) $(TEST_TARGET)
default: $(MAIN_TARGET)
test: $(TEST_TARGET)

$(OBJDIR)/%.o: %.c
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o [email protected]
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

$(OBJDIR)/%.o: %.cpp
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o [email protected]
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

limit_time:
    @echo update limit time
    @python update_limit_time.py

$(MAIN_TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo ---------------------------------------------------------------------
    @echo -- Arquivo gerado no diretorio: $(MAIN_TARGET) --
    @echo ---------------------------------------------------------------------
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(MAIN_TARGET)
    @touch version.cpp
    @chmod -R 777 $(BINDIR)/game

$(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
    @echo linking $(TEST_TARGET)
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o $(TEST_TARGET)

dump:
    @$(CC) -dM -E - < /dev/null > .nope.nope

symlink:
    @ln -fs game_r$(GAME_VERSION) $(BINDIR)/game_symlink

strip:
    @cp $(BINDIR)/game_r$(GAME_VERSION) $(BINDIR)/game_r
    @strip $(BINDIR)/game_r

clean:
    @rm -f $(COBJS) $(CPPOBJS) $(MAINOBJ) $(TESTOBJ)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @rm -f $(CDEPS) $(CPPDEPS) $(MAINDEPS) $(TESTDEPS)
endif
    @rm -f $(BINDIR)/game_r* $(BINDIR)/conv

cc-ver:
    @$(CC) -v

tag:
    ctags *.cpp *.h *.c

dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
    makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > $(DEPFILE)
endif

# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CDEPS)
sinclude $(CPPDEPS)
sinclude $(MAINDEPS)
sinclude $(TESTDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END
 

Share this post


Link to post
Share on other sites
  • 0
8 horas atrás, ButchGraig disse:

BINDIR = ../../../../ProjetoGame/srv1/share/bin

 

A mensagem de erro diz tudo, se o diretório não foi encontrado queres que o ficheiro vá parar onde?

 

 

Share this post


Link to post
Share on other sites
  • 0

Tenho essa mesma soucer pode.me.enviar seu compilador?

 BINDIR = ../../../../ProjetoGame/srv1/share/bin

 

 BINDIR = ..        deixa assim que o arquivo será criado na pasta padrão

Share this post


Link to post
Share on other sites
  • 0
16 horas atrás, ButchGraig disse:

quando compilo, no final tenho esta mensagem:

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

CC = g++

GAME_VERSION := $(shell cat ../../__REVISION__)

GccMajorVersion := $(shell expr `$(CC) -dumpversion | cut -f1 -d.`)
GccMinorVersion := $(shell expr `$(CC) -dumpversion | cut -f2 -d.`)
GccMinorEGT8 := $(shell expr $(GccMinorVersion) \>= 8)

INCDIR =
LIBDIR =
BINDIR = ../../../../ProjetoGame/srv1/share/bin
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 1
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_2_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_NEWSTUFF_EX = 0
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm -lmd

# Project Flags
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG

ifeq ($(GccMinorEGT8), 1)
CFLAGS += -Wno-unused-local-typedefs
endif

# FreeBSD stack protector
CFLAGS += -fstack-protector-all

# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__GAME_VERSION__=\"$(GAME_VERSION)\"

# Boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
        ../../../Extern/lib/libjasper.a\
        ../../../Extern/lib/libpng.a\
        ../../../Extern/lib/libtiff.a\
        ../../../Extern/lib/libjbig.a\
        ../../../Extern/lib/libmng.a\
        /usr/lib/liblzma.a\
        ../../../Extern/lib/liblcms.a\
        ../../../Extern/lib/libjpeg.a

# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a

# CryptoPP
LIBS += ../../../Extern/lib/libcryptopp.a

# GTest
ifeq ($(ENABLE_GOOGLE_TEST), 1)
LIBS += /usr/local/lib/libgtest.a
CFLAGS += -DENABLE_GOOGLE_TEST
endif

# HackShield
ifeq ($(ENABLE_HSHIELD_SYSTEM), 1)
INCDIR += -I../../libhackshield/include
LIBDIR += -L../../libhackshield/lib
LIBS   += -lanticpxsvr_st
CFLAGS += -DENABLE_HSHIELD_SYSTEM
endif

# XTrap
ifeq ($(ENABLE_XTRAP_SYSTEM), 1)
INCDIR += -I../../libxtrap/include
CFLAGS += -DENABLE_XTRAP_SYSTEM
endif

# OpenSSL
INCDIR += -I/usr/include
LIBS += -lssl
# LIBS += /usr/lib/libssl.a /usr/lib/libssh_p.a

# Lua
CFLAGS += -DENABLE_LUA_5_2_VERSION=ENABLE_LUA_5_2_VERSION
ifeq ($(ENABLE_LUA_5_2_VERSION), 1)
INCDIR += -I../../liblua/.lua52/install/include
LIBDIR += -L../../liblua/.lua52/install/lib
LIBS += ../../liblua/.lua52/install/lib/liblua.a
# LIBS += ../../liblua/.lua52/src/liblua.a
else
INCDIR += -I../../liblua/.lua50/include
LIBDIR += -L../../liblua/.lua50/lib
LIBS += ../../liblua/.lua50/lib/liblua.a ../../liblua/.lua50/lib/liblualib.a
endif

# Project Libraries
INCDIR += -I../../../Extern/include
INCDIR += -I/usr/local/include
LIBDIR += -L/usr/local/lib

INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../libserverkey
LIBS += -lthecore -lpoly -lsql -lgame -lserverkey

# PROJECT_SRC_FILES BEGIN
MAINCPP = main.cpp
TESTCPP = test.cpp

CFILE    = minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
    arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
    char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
    char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
    cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
    desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
    entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
    guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
    input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
    item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
    locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
    messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
    party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
    questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
    questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
    questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
    questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
    questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
    refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
    skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
    wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
    BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
    HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
    SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
    auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
    buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
    group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
    shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp shutdown_manager.cpp\
    item_combination.cpp\
    exp_event_manager.cpp\
    MeleyLair.cpp\
    TempleOchao.cpp\
    questlua_MeleyLair.cpp\
    questlua_TempleOchao.cpp\
    char_cards.cpp\
    char_fishs.cpp\
    combat_zone.cpp\
    empire_monument.cpp

ifeq ($(ENABLE_NEWSTUFF_EX), 1)
CPPFILE += questlua_new.cpp\
    questlua_new_constant.cpp\
    questlua_new_desc.cpp\
    questlua_new_item.cpp\
    questlua_new_npc.cpp\
    questlua_new_pc.cpp\
    questlua_new_quest.cpp\
    questlua_new_test.cpp
CFLAGS += -DENABLE_NEWSTUFF_EX=ENABLE_NEWSTUFF_EX
endif
# PROJECT_SRC_FILES END

# PROJECT_OBJ_FILES BEGIN
COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CDEPS    = $(COBJS:%.o=%.d)
CPPDEPS    = $(CPPOBJS:%.o=%.d)
endif

MAINOBJ = $(MAINCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
MAINDEPS = $(MAINOBJ:%.o=%.d)
endif

TESTOBJ = $(TESTCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
TESTDEPS = $(TESTOBJ:%.o=%.d)
endif
# PROJECT_OBJ_FILES END

# Target Paths
# MAIN_TARGET = $(BINDIR)/game_r$(GAME_VERSION)
MAIN_TARGET = $(BINDIR)/game
TEST_TARGET = $(BINDIR)/game_r$(GAME_VERSION)_test

# previously -> default: $(MAIN_TARGET) $(TEST_TARGET)
default: $(MAIN_TARGET)
test: $(TEST_TARGET)

$(OBJDIR)/%.o: %.c
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o [email protected]
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

$(OBJDIR)/%.o: %.cpp
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o [email protected]
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

limit_time:
    @echo update limit time
    @python update_limit_time.py

$(MAIN_TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo ---------------------------------------------------------------------
    @echo -- Arquivo gerado no diretorio: $(MAIN_TARGET) --
    @echo ---------------------------------------------------------------------
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(MAIN_TARGET)
    @touch version.cpp
    @chmod -R 777 $(BINDIR)/game

$(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
    @echo linking $(TEST_TARGET)
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o $(TEST_TARGET)

dump:
    @$(CC) -dM -E - < /dev/null > .nope.nope

symlink:
    @ln -fs game_r$(GAME_VERSION) $(BINDIR)/game_symlink

strip:
    @cp $(BINDIR)/game_r$(GAME_VERSION) $(BINDIR)/game_r
    @strip $(BINDIR)/game_r

clean:
    @rm -f $(COBJS) $(CPPOBJS) $(MAINOBJ) $(TESTOBJ)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @rm -f $(CDEPS) $(CPPDEPS) $(MAINDEPS) $(TESTDEPS)
endif
    @rm -f $(BINDIR)/game_r* $(BINDIR)/conv

cc-ver:
    @$(CC) -v

tag:
    ctags *.cpp *.h *.c

dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
    makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > $(DEPFILE)
endif

# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CDEPS)
sinclude $(CPPDEPS)
sinclude $(MAINDEPS)
sinclude $(TESTDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END
 

ta falando que ta tentando cria direto na pasta aonde ta a files BINDIR = ../../../../ProjetoGame/srv1/share/bin

altere este caminho EX: BINDIR = ../../source/server/game/src

Share this post


Link to post
Share on other sites
  • 0
12 horas atrás, Truta190 disse:

Tenho essa mesma soucer pode.me.enviar seu compilador?

 BINDIR = ../../../../ProjetoGame/srv1/share/bin

 

 BINDIR = ..        deixa assim que o arquivo será criado na pasta padrão

ja tentei de tudo, mas quando deixo o bin deste forma, tenho este erro: 

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

Se eu mudar o caminho que ja está aí como padrão no makefile, ele me da este erro do print

Share this post


Link to post
Share on other sites
  • 0
Em 23/05/2020 at 08:00, Karbust disse:

Se a pasta for game/src e o makefile estiver em src o ficheiro será criado em game, o nível anterior.

estou tendo este erro agora: 

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

Share this post


Link to post
Share on other sites
  • 0
5 horas atrás, ButchGraig disse:

estou tendo este erro agora: 

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

 

Comandos que vejas no makefile -l<xxx> são libs, neste caso ele não encontra o ficheiro libanticpxsvr_st.so

Share this post


Link to post
Share on other sites
  • 0
9 horas atrás, Karbust disse:

 

Comandos que vejas no makefile -l<xxx> são libs, neste caso ele não encontra o ficheiro libanticpxsvr_st.so

verifiquei e as libs estão nos caminhos informados

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now