Advertisement
Guest User

Untitled

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