Advertisement
Guest User

Untitled

a guest
May 9th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.86 KB | None | 0 0
  1. PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)
  2.  
  3. GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
  4. BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
  5. SVN_VERSION = 60006
  6.  
  7. CC = g++
  8.  
  9. INCDIR =
  10. LIBDIR =
  11. BINDIR = ..
  12. OBJDIR = OBJDIR
  13. $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
  14.  
  15. # Standard Setting
  16. LIBS = -pthread -lm -lmd
  17. # Removed -fno-rtti
  18. CFLAGS = -w -g -Wall -O2 -m32 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG -D__SVN_VERSION__=\"$(SVN_VERSION)\"
  19.  
  20. ifeq ($(GCC_VERSION), 4)
  21. CFLAGS += -mtune=i686 -fstack-protector-all
  22. else
  23. CFLAGS += -mcpu=i686
  24. endif
  25.  
  26. # boost
  27. INCDIR += -I../../../Extern/include/boost
  28.  
  29. # DevIL
  30. INCDIR += -I../../libdevil
  31. LIBDIR += -L../../libdevil
  32. LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg
  33.  
  34. # MySQL
  35. ifeq ($(BSD_VERSION), 7)
  36. INCDIR += -I../../libmysql/7.x-5.1.35
  37. LIBDIR += -L../../libmysql/7.x-5.1.35
  38. else
  39. INCDIR += -I../../libmysql/5.x-5.1.35
  40. LIBDIR += -L../../libmysql/5.x-5.1.35
  41. endif
  42.  
  43. LIBS += -lmysqlclient -lz
  44.  
  45. # Miscellaneous external libraries
  46. INCDIR += -I../../../Extern/include
  47. LIBDIR += -L../../../Extern/lib
  48. LIBS += -lcryptopp -lgtest
  49.  
  50. # HackShield
  51. INCDIR += -I../../libhackshield/include
  52. LIBDIR += -L../../libhackshield/lib
  53. LIBS += -lanticpxsvr
  54.  
  55. # XTrap
  56. INCDIR += -I../../libxtrap/include
  57.  
  58. # openssl
  59. #INCDIR += -I/usr/include
  60. LIBS += -lssl
  61.  
  62. # Project Library
  63. INCDIR += -I../../liblua/include
  64. INCDIR += -I/usr/local/include
  65. INCDIR += -I../../libserverkey
  66. LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkey
  67. LIBDIR += -L/usr/local/lib
  68. LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkey
  69. USE_STACKTRACE = 0
  70. ifeq ($(USE_STACKTRACE), 1)
  71. LIBS += /usr/local/lib/libexecinfo.a
  72. endif
  73.  
  74. TARGET = $(BINDIR)/game_r$(P4_VERSION)_$(PLATFORM)
  75.  
  76. CFILE = minilzo.c
  77.  
  78. CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
  79. arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
  80. char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
  81. char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
  82. cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
  83. desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
  84. entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
  85. guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
  86. input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
  87. item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
  88. locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
  89. messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
  90. party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
  91. questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
  92. questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
  93. questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
  94. questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
  95. questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
  96. refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
  97. skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
  98. wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
  99. BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
  100. HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
  101. SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
  102. auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
  103. buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
  104. group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
  105. shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp
  106.  
  107.  
  108. COBJS = $(CFILE:%.c=$(OBJDIR)/%.o)
  109. CPPOBJS = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
  110.  
  111. MAINOBJ = $(OBJDIR)/main.o
  112. MAINCPP = main.cpp
  113.  
  114. TESTOBJ = $(OBJDIR)/test.o
  115. TESTCPP = test.cpp
  116. TEST_TARGET = $(BINDIR)/test
  117.  
  118. default: $(TARGET)
  119. @strip $(TARGET)
  120.  
  121. $(OBJDIR)/minilzo.o: minilzo.c
  122. @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
  123. @echo compile $<
  124.  
  125. $(OBJDIR)/version.o: version.cpp
  126. @$(CC) $(CFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__P4_VERSION__=\"$(P4_VERSION)\" -c $< -o $@
  127. @echo compile $<
  128.  
  129. $(OBJDIR)/%.o: %.cpp
  130. @echo compile $<
  131. @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
  132.  
  133. limit_time:
  134. @echo update limit time
  135. @python update_limit_time.py
  136.  
  137. $(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
  138. @echo linking $(TARGET)....
  139. @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET)
  140.  
  141. $(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
  142. @echo linking $(TEST_TARGET)
  143. @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o ../test
  144.  
  145. clean:
  146. @rm -f $(COBJS) $(CPPOBJS)
  147. @rm -f $(BINDIR)/game_r* $(BINDIR)/conv
  148.  
  149. tag:
  150. ctags *.cpp *.h *.c
  151.  
  152. dep:
  153. makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > Depend
  154.  
  155. sinclude Depend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement