9
3

makefile.a64 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. #These are the build commands for Lua
  2. SYSCFLAGS="-DLUA_COMPAT_ALL -DLUA_USE_LINUX"
  3. LUABUILDCMD=gcc -O2 -Wall -c $(SYSCFLAGS)
  4. LUADIR=LUA
  5. BUILDLUA=@echo Building Lua 5.3.4...; cd $(LUADIR); \
  6. $(LUABUILDCMD) lapi.c; \
  7. $(LUABUILDCMD) lauxlib.c; \
  8. $(LUABUILDCMD) lbaselib.c; \
  9. $(LUABUILDCMD) lbitlib.c; \
  10. $(LUABUILDCMD) lcode.c; \
  11. $(LUABUILDCMD) lcorolib.c; \
  12. $(LUABUILDCMD) lctype.c; \
  13. $(LUABUILDCMD) ldblib.c; \
  14. $(LUABUILDCMD) ldebug.c; \
  15. $(LUABUILDCMD) ldo.c; \
  16. $(LUABUILDCMD) ldump.c; \
  17. $(LUABUILDCMD) lfunc.c; \
  18. $(LUABUILDCMD) lgc.c; \
  19. $(LUABUILDCMD) linit.c; \
  20. $(LUABUILDCMD) liolib.c; \
  21. $(LUABUILDCMD) llex.c; \
  22. $(LUABUILDCMD) lmathlib.c; \
  23. $(LUABUILDCMD) lmem.c; \
  24. $(LUABUILDCMD) loadlib.c; \
  25. $(LUABUILDCMD) lobject.c; \
  26. $(LUABUILDCMD) lopcodes.c; \
  27. $(LUABUILDCMD) loslib.c; \
  28. $(LUABUILDCMD) lparser.c; \
  29. $(LUABUILDCMD) lstate.c; \
  30. $(LUABUILDCMD) lstring.c; \
  31. $(LUABUILDCMD) lstrlib.c; \
  32. $(LUABUILDCMD) ltable.c; \
  33. $(LUABUILDCMD) ltablib.c; \
  34. $(LUABUILDCMD) ltm.c; \
  35. $(LUABUILDCMD) lundump.c; \
  36. $(LUABUILDCMD) lutf8lib.c; \
  37. $(LUABUILDCMD) lvm.c; \
  38. $(LUABUILDCMD) lzio.c; \
  39. $(LUABUILDCMD) lua.hpp; \
  40. ar rs liblua5-3-4.a *.o; \
  41. echo Finished with Lua.
  42. #ar rs liblua5-3-4.a lapi.o lauxlib.o lbaselib.o lbitlib.o lcode.o lcorolib.o lctype.o ldblib.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o liolib.o llex.o lmathlib.o lmem.o loadlib.o lobject.o lopcodes.o loslib.o lparser.o lstate.o lstring.o lstrlib.o ltable.o ltablib.o ltm.o lundump.o lutf8lib.o lvm.o lzio.o; \
  43. APP=eq2world
  44. SRC= ../common/Condition.o \
  45. ../common/ConfigReader.o \
  46. ../common/CRC16.o \
  47. ../common/Crypto.o \
  48. ../common/DatabaseNew.o \
  49. ../common/DatabaseResult.o \
  50. ../common/dbcore.o \
  51. ../common/emu_opcodes.o \
  52. ../common/EQEMuError.o \
  53. ../common/Log.o \
  54. ../common/md5.o \
  55. ../common/misc.o \
  56. ../common/MiscFunctions.o \
  57. ../common/Mutex.o \
  58. ../common/opcodemgr.o \
  59. ../common/packet_dump.o \
  60. ../common/packet_functions.o \
  61. ../common/PacketStruct.o \
  62. ../common/RC4.o \
  63. ../common/TCPConnection.o \
  64. ../common/timer.o \
  65. ../common/unix.o \
  66. ../common/xmlParser.o \
  67. ../common/debug.o \
  68. ../common/database.o \
  69. ../common/EQStream.o \
  70. ../common/EQStreamFactory.o \
  71. ../common/EQPacket.o \
  72. Achievements/Achievements.o \
  73. Achievements/AchievementsDB.o \
  74. AltAdvancement/AltAdvancement.o \
  75. AltAdvancement/AltAdvancementDB.o \
  76. Chat/Chat.o \
  77. Chat/ChatDB.o \
  78. Chat/ChatChannel.o \
  79. classes.o \
  80. client.o \
  81. ClientPacketFunctions.o \
  82. Collections/Collections.o \
  83. Collections/CollectionsDB.o \
  84. Combat.o \
  85. Commands/Commands.o \
  86. Commands/CommandsDB.o \
  87. Commands/ConsoleCommands.o \
  88. Entity.o \
  89. Factions.o \
  90. GroundSpawn.o \
  91. Guilds/Guild.o \
  92. Guilds/GuildDB.o \
  93. HeroicOp/HeroicOp.o \
  94. HeroicOp/HeroicOpDB.o \
  95. HeroicOp/HeroicOpPackets.o \
  96. Housing/HousingDB.o \
  97. Housing/HousingPackets.o \
  98. IRC/IRC.o \
  99. IRC/IRCChannel.o \
  100. IRC/IRCMessage.o \
  101. IRC/IRCServer.o \
  102. Items/Items.o \
  103. Items/ItemsDB.o \
  104. Items/Loot.o \
  105. Items/LootDB.o \
  106. Languages.o \
  107. LoginServer.o \
  108. LuaFunctions.o \
  109. LuaInterface.o \
  110. net.o \
  111. NPC.o \
  112. NPC_AI.o \
  113. Object.o \
  114. Patch/buffer.o \
  115. Patch/patch.o \
  116. Patch/tcp.o \
  117. Patch/tcp-client.o \
  118. Player.o \
  119. PlayerGroups.o \
  120. Quests.o \
  121. races.o \
  122. RaceTypes/RaceTypes.o \
  123. RaceTypes/RaceTypesDB.o \
  124. Recipes/Recipe.o \
  125. Recipes/RecipeDB.o \
  126. Rules/Rules.o \
  127. Rules/RulesDB.o \
  128. Sign.o \
  129. Skills.o \
  130. Spawn.o \
  131. Spells.o \
  132. SpellProcess.o \
  133. Titles.o \
  134. Tradeskills/Tradeskills.o \
  135. Tradeskills/TradeskillsDB.o \
  136. Tradeskills/TradeskillsPackets.o \
  137. Traits/Traits.o \
  138. Widget.o \
  139. World.o \
  140. WorldDatabase.o \
  141. Zone/SPGrid.o \
  142. Zone/ChestTraps.o \
  143. zoneserver.o
  144. CXXFLAGS=-std=c++14
  145. CFLAGS=`mysql_config --cflags` -march=native -pipe -pthread
  146. LDFLAGS=`mysql_config --libs` -I$(LUADIR) -L$(LUADIR) -llua5-3-4 -rdynamic
  147. WFLAGS=-Wall -Wno-reorder
  148. DFLAGS=-DEQ2 -DWORLD
  149. CC=g++
  150. LINKER=g++
  151. #Switch for Debug or Release build
  152. ifeq ($(BUILD),release)
  153. # "Release" build - optimization, and no debug symbols
  154. CFLAGS += -O2 -s -DNDEBUG
  155. else
  156. # "Debug" build - minimum optimization, and debugging symbols
  157. CFLAGS += -O -ggdb
  158. endif
  159. all: $(APP)
  160. $(APP): $(SRC)
  161. $(BUILDLUA)
  162. @echo Linking...; $(LINKER) $(CFLAGS) $(WFLAGS) $(DFLAGS) $(CXXFLAGS) $(OBJS) $^ $(LDFLAGS) -o $@ -lm -Wl,-E -ldl -lreadline -lboost_system -lboost_filesystem -lboost_iostreams -lboost_regex
  163. @echo Finished building world.
  164. %.o: %.cpp
  165. $(CC) -c $(CFLAGS) $(CXXFLAGS) $(WFLAGS) $(DFLAGS) $< -o $@
  166. .obj/%.o: $(COMMON)/%.cpp $(COMMON)/%.h
  167. mkdir -p .obj
  168. $(CC) $(CFLAGS) $(WFLAGS) $(DFLAGS) $(CXXFLAGS) -c $< -o $@
  169. debug:
  170. @$(MAKE) "BUILD=debug"
  171. release:
  172. @$(MAKE) "BUILD=release"
  173. clean:
  174. rm -f $(SRC) $(APP)
  175. #CFLAGS=`mysql_config --cflags` -I../LUA/include
  176. #LIB=`mysql_config --libs` -L../LUA -llua5.1
  177. #COPTS=$(WFLAGS) -g -march=athlon64 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) $(CFLAGS)
  178. #LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz $(LIB) -ldl
  179. #all: $(APP)
  180. #$(APP): $(SF)
  181. # @$(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@
  182. #clean:
  183. # @rm -f $(SF) $(APP)
  184. #%.o: %.cpp
  185. # @$(CC) -c $(COPTS) $< -o $@
  186. #.obj/%.o: ../common/%.cpp ../common/%.h
  187. # @mkdir -p .obj
  188. # @$(CC) $(COPTS) -c $< -o $@