Jump to content

Recommended Posts

Witam mam problem z kompilacją source

 

FreeBsd 10.1 x64

 

pkg 1.9.3
gmake 4.2.1_1
makedepend 1.0.5.1
python 2.7_2,2
subversion 1.9.4
devil 1.7.8_21,1
gcc 4.9.4
googletest 1.8.0
 
 

Bez tytułu.jpg

 

 

W extern/mysql/lib/   jest libmysqlclient.a

 

 

Makefile:

Spoiler

CC = c++
CFLAGS += -w -O2 -ggdb3 -g3 -std=c++11 -pipe -mtune=i386 -fstack-protector -static -mcmodel=large
TARGET =/root/game/share/db

##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################
##############################################################################

############# libthecore libs and includes
INCDIR += -I/../../libthecore/src
LIBDIR += -L../../libthecore
LIBS   += -lthecore

############# libgame libs and includes
INCDIR += -I../../libgame/src
LIBDIR += -L../../libgame
LIBS   += -lgame

############# libsql libs and includes
INCDIR += -I../../libsql/src
LIBDIR += -L../../libsql
LIBS   += -lsql

############# libpoly libs and includes
INCDIR += -I../../libpoly/src
LIBDIR += -L../../libpoly
LIBS   += -lpoly

############# mysql libs and includes
INCDIR += -I../../../extern/mysql
LIBDIR += -L../../../extern/mysql/lib
LIBS   += -lmysqlclient -lz -pthread

############# boost libs and includes
INCDIR += -I../../../extern/boost
LIBDIR += -L../../../extern/boost/lib
LIBS   += -lboost_system

############# source files
CPP=Cache.cpp\
    ClientManager.cpp\
    ClientManagerBoot.cpp\
    ClientManagerEventFlag.cpp\
    ClientManagerGuild.cpp\
    ClientManagerHorseName.cpp\
    ClientManagerLogin.cpp\
    ClientManagerParty.cpp\
    ClientManagerPlayer.cpp\
    Config.cpp\
    CsvReader.cpp\
    DBManager.cpp\
    GuildManager.cpp\
    ItemAwardManager.cpp\
    ItemIDRangeManager.cpp\
    LoginData.cpp\
    Main.cpp\
    Marriage.cpp\
    MoneyLog.cpp\
    NetBase.cpp\
    Peer.cpp\
    PeerBase.cpp\
    PrivManager.cpp\
    ProtoReader.cpp\
############################################################################
OBJDIR = .obj

$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
OBJS = $(CPP:%.cpp=$(OBJDIR)/%.o)

default: $(TARGET)

clean:
    @echo Clean done!
    @find . -type f | xargs -n 5 touch
    @rm -rf $(OBJDIR)
    @rm -rf $(TARGET)

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

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

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.