Jump to content

Recommended Posts

root@develope:/usr/src/mainline/Srcs/Server/db/src # gmake
p4: not found
p4: not found
p4: not found
linking ...
/usr/bin/ld: cannot find -lmysqlclient
Makefile:51: recipe for target '../db_r' failed
gmake: *** [../db_r] Error 1

Link to comment
https://metin2.dev/topic/4573-compiling-the-database-core/
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Use this MakeFile :)

 

PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)


GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3  | cut -d'.' -f1)
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
P4_VERSION = 40250


CC = g++


INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)


# Standard Setting
LIBS = -pthread -lm -lmd
# Removed -fno-rtti 
CFLAGS = -g -Wall -O2 -m32 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG # -D_USE_SERVER_KEY_


ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686 -fstack-protector-all
else
CFLAGS += -mcpu=i686
endif


# boost
INCDIR += -I../../../Extern/include/boost


# DevIL
INCDIR += -I../../libdevil
LIBDIR += -L../../libdevil
LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg


# MySQL
#ifeq ($(BSD_VERSION), 7)
INCDIR += -I../../libmysql/7.x-5.1.35
LIBDIR += -L../../libmysql/7.x-5.1.35
#else
#INCDIR += -I../../libmysql/5.x-5.1.35
#LIBDIR += -L../../libmysql/5.x-5.1.35
#endif


LIBS += -lmysqlclient -L/usr/local/lib/mysql -lz


# Miscellaneous external libraries
INCDIR += -I../../../Extern/include
LIBDIR += -L../../../Extern/lib
LIBS += -lcryptopp -lgtest


# openssl
#INCDIR += -I/usr/include
#LIBS += -lssl
#LIBS += /usr/lib/libssl.a


# Project Library
INCDIR += -I../../liblua/include
INCDIR += -I/usr/local/include
INCDIR += -L/usr/local/lib/mysql
INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkey
LIBDIR += -L/usr/local/lib
LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkey
USE_STACKTRACE = 0
ifeq ($(USE_STACKTRACE), 1)
LIBS += /usr/local/lib/libexecinfo.a
endif


TARGET  = $(BINDIR)/db_r$(P4_VERSION)_$(PLATFORM)


SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp 
Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp 
ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp 
PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp 
Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp 
AuctionManager.cpp ProtoReader.cpp CsvReader.cpp


OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o)


default: $(TARGET)


$(TARGET): $(OBJS)
@echo linking ...
@$(CC) $(CFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET)
@touch version.cpp


$(OBJDIR)/%.o: %.cpp
@echo compile $<
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@


$(OBJDIR)/version.o: version.cpp
@$(CC) $(CFLAGS) -D__P4_VERSION__="$(SVN_VERSION)" -c $< -o $@
@echo compile $<


$(OBJDIR):
@mkdir $(OBJDIR)


clean:
@rm -f $(OBJS) $(BINDIR)/db_r*


dep:
@touch Depend
makedepend -fDepend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(SRCS) 2> /dev/null


sinclude Depend
Link to comment
https://metin2.dev/topic/4573-compiling-the-database-core/#findComment-28886
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.