Guest User

Untitled

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