9
3

makefile.a64 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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/ChestTraps.o \
  142. zoneserver.o
  143. CXXFLAGS=-std=c++17
  144. CFLAGS=`mysql_config --cflags` -march=native -pipe -pthread
  145. LDFLAGS=`mysql_config --libs` -I$(LUADIR) -L$(LUADIR) -llua5-3-4 -rdynamic
  146. WFLAGS=-Wall -Wno-reorder
  147. DFLAGS=-DEQ2 -DWORLD
  148. CC=g++
  149. LINKER=g++
  150. #Switch for Debug or Release build
  151. ifeq ($(BUILD),release)
  152. # "Release" build - optimization, and no debug symbols
  153. CFLAGS += -O2 -s -DNDEBUG
  154. else
  155. # "Debug" build - minimum optimization, and debugging symbols
  156. CFLAGS += -O -ggdb
  157. endif
  158. all: $(APP)
  159. $(APP): $(SRC)
  160. $(BUILDLUA)
  161. @echo Linking...; $(LINKER) $(CFLAGS) $(WFLAGS) $(DFLAGS) $(CXXFLAGS) $(OBJS) $^ $(LDFLAGS) -o $@ -lm -Wl,-E -ldl -lreadline -lboost_system -lboost_filesystem -lboost_iostreams -lboost_regex
  162. @echo Finished building world.
  163. %.o: %.cpp
  164. $(CC) -c $(CFLAGS) $(CXXFLAGS) $(WFLAGS) $(DFLAGS) $< -o $@
  165. .obj/%.o: $(COMMON)/%.cpp $(COMMON)/%.h
  166. mkdir -p .obj
  167. $(CC) $(CFLAGS) $(WFLAGS) $(DFLAGS) $(CXXFLAGS) -c $< -o $@
  168. debug:
  169. @$(MAKE) "BUILD=debug"
  170. release:
  171. @$(MAKE) "BUILD=release"
  172. clean:
  173. rm -f $(SRC) $(APP)
  174. #CFLAGS=`mysql_config --cflags` -I../LUA/include
  175. #LIB=`mysql_config --libs` -L../LUA -llua5.1
  176. #COPTS=$(WFLAGS) -g -march=athlon64 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) $(CFLAGS)
  177. #LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz $(LIB) -ldl
  178. #all: $(APP)
  179. #$(APP): $(SF)
  180. # @$(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@
  181. #clean:
  182. # @rm -f $(SF) $(APP)
  183. #%.o: %.cpp
  184. # @$(CC) -c $(COPTS) $< -o $@
  185. #.obj/%.o: ../common/%.cpp ../common/%.h
  186. # @mkdir -p .obj
  187. # @$(CC) $(COPTS) -c $< -o $@