Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. MAKE = gmake
  2. CC = g++
  3.  
  4. INCDIR =
  5. LIBDIR =
  6. BINDIR = ..
  7. OBJDIR = .obj
  8.  
  9. SVN_VERSION = 40146
  10.  
  11. GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
  12. BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
  13. $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
  14.  
  15. TARGET = $(BINDIR)/db_r$(SVN_VERSION)
  16.  
  17. CFLAGS = -w -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -pthread -D_THREAD_SAFE
  18.  
  19. ifeq ($(GCC_VERSION), 4)
  20. CFLAGS += -mtune=i686
  21. else
  22. CFLAGS += -mcpu=i686
  23. endif
  24.  
  25. # Boost
  26. INCDIR += -I../../../External/include/boost
  27.  
  28. # MySQL
  29. ifeq ($(BSD_VERSION), 7)
  30. INCDIR += -I../../../Internal/libmysql/7.x-5.1.35
  31. LIBDIR += -L../../../Internal/libmysql/7.x-5.1.35
  32. else
  33. INCDIR += -I../../../Internal/libmysql/5.x-5.1.35
  34. LIBDIR += -L../../../Internal/libmysql/5.x-5.1.35
  35. endif
  36.  
  37. LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib
  38.  
  39. LIBS += -lssl -lcrypto
  40. # LIBDIR += -L../../../Internal/libthecore/lib -L../../../Internal/libsql -L../../../Internal/libpoly -L../../../Internal/libgame/lib
  41.  
  42. # LIBS = -lthecore -lmysqlclient -lsql -lpoly -lgame -lm -lz
  43.  
  44. SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp\
  45. Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp\
  46. ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp\
  47. PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp\
  48. Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp\
  49. AuctionManager.cpp ProtoReader.cpp CsvReader.cpp
  50.  
  51. OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o)
  52.  
  53. default: $(TARGET)
  54. @strip $(TARGET)
  55.  
  56. $(TARGET): $(OBJS)
  57. @echo linking ..
  58. @$(CC) $(CFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET)
  59. @touch version.cpp
  60.  
  61. $(OBJDIR)/%.o: %.cpp
  62. @echo compile $<
  63. @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
  64.  
  65. $(OBJDIR)/version.o: version.cpp
  66. @$(CC) $(CFLAGS) -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
  67. @echo compile $<
  68.  
  69. $(OBJDIR):
  70. @mkdir $(OBJDIR)
  71.  
  72. clean:
  73. @rm -f $(OBJS) $(BINDIR)/db_r*
  74.  
  75. dep:
  76. @touch Depend
  77. makedepend -fDepend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(SRCS) 2> /dev/null
  78.  
  79. sinclude Depend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement