Don't forget reagain build cryptopp(!)
For Extern:
Extern:
Example file
db/Makefile
Game/src/Makefile
libgame Makefile
liblua config
libpoly/Makefile
libsql Makefile
For Extern:
To see the download links,
Log in or register now.
Extern:
To see the download links,
Log in or register now.
in ServerSRC remove this files
libdevil
libmysql
teen
libserverkey
libdevil
libmysql
teen
libserverkey
2 Step All file
Change code blocks
auto_ptr -> unique_ptr
typeof -> __typeof
Change code blocks
auto_ptr -> unique_ptr
typeof -> __typeof
Freebsd need this packages
* pkg install boost-all
* MySQL
* openssl
* python
* git
* gcc9
* gmake
* makedepend
* subversion
* pkg install boost-all
* MySQL
* openssl
* python
* git
* gcc9
* gmake
* makedepend
* subversion
Lzo update old version > 2.10g
LZO2.11:
LZO2.11:
Step1: Open the lzo-2.10 file
Step2: Put the files in /Server/game/src directly.
Step3: Of course, since there are minilzo.c and minilzo.h, it will want to change it, first delete it from game/src and then discard it.
LZO2.11:
To see the download links,
Log in or register now.
LZO2.11:
To see the download links,
Log in or register now.
Step1: Open the lzo-2.10 file
Step2: Put the files in /Server/game/src directly.
Step3: Of course, since there are minilzo.c and minilzo.h, it will want to change it, first delete it from game/src and then discard it.
game/src/sectree_manager.cpp
Scan : unsigned int uiDestSize;
Change it : lzo_uint uiDestSize;
Scan : unsigned int uiDestSize;
Change it : lzo_uint uiDestSize;
game/src/cipher.h
Scan : encoder_->ProcessData((CryptoPP*)buffer, (const CryptoPP*)buffer, length);
Change it: encoder_->ProcessData((CryptoPP::byte*)buffer, (const CryptoPP::byte*)buffer, length);
Scan: decoder_->ProcessData((byte*)buffer, (const byte*)buffer, length);
Change it: decoder_->ProcessData((CryptoPP::byte*)buffer, (const CyptoPP::byte*)buffer, length);
Scan : encoder_->ProcessData((CryptoPP*)buffer, (const CryptoPP*)buffer, length);
Change it: encoder_->ProcessData((CryptoPP::byte*)buffer, (const CryptoPP::byte*)buffer, length);
Scan: decoder_->ProcessData((byte*)buffer, (const byte*)buffer, length);
Change it: decoder_->ProcessData((CryptoPP::byte*)buffer, (const CyptoPP::byte*)buffer, length);
game/src/char.h
Scan: TSkillUseInfo
Add to upper: typedef std::map<VID, size_t> targetMap;
Scan: boost::unordered_map<DWORD, size_t> TargetVIDMap;
Change it: targetMap TargetVIDMap;
Scan: TSkillUseInfo
Add to upper: typedef std::map<VID, size_t> targetMap;
Scan: boost::unordered_map<DWORD, size_t> TargetVIDMap;
Change it: targetMap TargetVIDMap;
game/src/char_skill.cpp
Scan: boost::unordered_map<VID size_t>:: iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
Change it: targetMap:: iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
Scan: boost::unordered_map<VID size_t>:: iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
Change it: targetMap:: iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
game/src/main.cpp
Scan:
#ifndef __WIN32__
#include <gtest/gtest.h>
#endif
Change it or remove it:
// #ifndef __WIN32__
// #include <gtest/gtest.h>
// #endif
Scan:
if ( argc > 1 )
{
if ( strcmp( argv[1], "unittest" ) == 0 )
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
}
Change it or remove it:
// #ifndef __WIN32__
// // <Factor> start unit tests if option is set
// if ( argc > 1 )
// {
// if ( strcmp( argv[1], "unittest" ) == 0 )
// {
// ::testing::InitGoogleTest(&argc, argv);
// return RUN_ALL_TESTS();
// }
// }
// #endif
Scan: extern const char * _malloc_options;
Change it or remove : //extern const char * _malloc_options;
Scan: _malloc_options = "A";
Change it : //_malloc_options = "A";
Scan:
#ifndef __WIN32__
#include <gtest/gtest.h>
#endif
Change it or remove it:
// #ifndef __WIN32__
// #include <gtest/gtest.h>
// #endif
Scan:
if ( argc > 1 )
{
if ( strcmp( argv[1], "unittest" ) == 0 )
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
}
Change it or remove it:
// #ifndef __WIN32__
// // <Factor> start unit tests if option is set
// if ( argc > 1 )
// {
// if ( strcmp( argv[1], "unittest" ) == 0 )
// {
// ::testing::InitGoogleTest(&argc, argv);
// return RUN_ALL_TESTS();
// }
// }
// #endif
Scan: extern const char * _malloc_options;
Change it or remove : //extern const char * _malloc_options;
Scan: _malloc_options = "A";
Change it : //_malloc_options = "A";
libgame/src/grid.cc
Add include : #include <algorithm>
Scan: int iSize = std::MIN(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Change it: int iSize = std::min(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Add include : #include <algorithm>
Scan: int iSize = std::MIN(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Change it: int iSize = std::min(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
A lot of time I can saw empty #endif be careful
libthecore/include/stdafx.h
Scan: #include <sys/event.h>
Add under:
#define typeof(x) __typeof__(x)
#endif
libthecore/include/stdafx.h
Scan: #include <sys/event.h>
Add under:
#define typeof(x) __typeof__(x)
#endif
common/stl.h
Scan : template <typename T> T MIN(T a, T b)
Add comment line this codes
After
Before:
template <typename T> T MIN(T a, T b)
{
// return a < b ? a : b;
}
template <typename T> T MAX(T a, T b)
{
// return a > b ? a : b;
}
After:
// template <typename T> T MIN(T a, T b)
// {
// return a < b ? a : b;
// }
// template <typename T> T MAX(T a, T b)
// {
// return a > b ? a : b;
// }
Scan : template <typename T> T MIN(T a, T b)
Add comment line this codes
After
Before:
template <typename T> T MIN(T a, T b)
{
// return a < b ? a : b;
}
template <typename T> T MAX(T a, T b)
{
// return a > b ? a : b;
}
After:
// template <typename T> T MIN(T a, T b)
// {
// return a < b ? a : b;
// }
// template <typename T> T MAX(T a, T b)
// {
// return a > b ? a : b;
// }
db/src/grid.cpp
Add include: #include <algorithm>
Scan: int iSize = std::MIN(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Change it: int iSize = std::min(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Add include: #include <algorithm>
Scan: int iSize = std::MIN(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
Change it: int iSize = std::min(w * h, pkGrid->m_iWidth * pkGrid->m_iHeight);
db/src/Main.cpp
Scan: malloc
Before:
#ifdef __FreeBSD__
extern const char * _malloc_options;
#endif
#ifdef __FreeBSD__
_malloc_options = "A";
#endif
After:
/*#ifdef __FreeBSD__
extern const char * _malloc_options;
#endif*/
// #ifdef __FreeBSD__
// _malloc_options = "A";
// #endif
Scan: malloc
Before:
#ifdef __FreeBSD__
extern const char * _malloc_options;
#endif
#ifdef __FreeBSD__
_malloc_options = "A";
#endif
After:
/*#ifdef __FreeBSD__
extern const char * _malloc_options;
#endif*/
// #ifdef __FreeBSD__
// _malloc_options = "A";
// #endif
Create ../../Server/__VERSION__ file
db/src/version.cpp
Scan: fprintf(fp, "game perforce revision: %s\n", __P4_VERSION__);
Change it: fprintf(fp, "game perforce revision: %s\n", __VERSION__);
db/src/version.cpp
Scan: fprintf(fp, "game perforce revision: %s\n", __P4_VERSION__);
Change it: fprintf(fp, "game perforce revision: %s\n", __VERSION__);
game/src/item_manager.cpp
Scan: ../libgame/include/grid.h
Change it: ../../libgame/include/grid.h
Scan: ../libgame/include/grid.h
Change it: ../../libgame/include/grid.h
Example file
Makefile:
CC=gcc9
CXX=g++9
PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
default: libthecore libpoly libgame liblua libsql game db
@echo "--------------------------------------"
@echo "Build Done"
@echo "--------------------------------------"
liblua: .
$(MAKE) -C $@ clean
$(MAKE) -C $@
libsql: .
@touch $@/Depend
$(MAKE) -C $@ dep
$(MAKE) -C $@ clean
$(MAKE) -C $@
libgame: .
@touch $@/src/Depend
$(MAKE) -C $@/src dep
$(MAKE) -C $@/src clean
$(MAKE) -C $@/src
libpoly: .
@touch $@/Depend
$(MAKE) -C $@ dep
$(MAKE) -C $@ clean
$(MAKE) -C $@
libthecore: .
@touch $@/src/Depend
$(MAKE) -C $@/src dep
$(MAKE) -C $@/src clean
$(MAKE) -C $@/src
game: .
@touch $@/src/Depend
$(MAKE) -C $@/src dep
$(MAKE) -C $@/src
db: .
@touch $@/src/Depend
$(MAKE) -C $@/src dep
$(MAKE) -C $@/src
all:
@echo "--------------------------------------"
@echo "Full Build Start"
@echo "--------------------------------------"
$(MAKE) -C liblua clean
$(MAKE) -C liblua
@touch libsql/Depend
$(MAKE) -C libsql dep
$(MAKE) -C libsql clean
$(MAKE) -C libsql
@touch libgame/src/Depend
$(MAKE) -C libgame/src dep
$(MAKE) -C libgame/src clean
$(MAKE) -C libgame/src
@touch libpoly/Depend
$(MAKE) -C libpoly dep
$(MAKE) -C libpoly clean
$(MAKE) -C libpoly
@touch libthecore/src/Depend
$(MAKE) -C libthecore/src dep
$(MAKE) -C libthecore/src clean
$(MAKE) -C libthecore/src
@touch game/src/Depend
$(MAKE) -C game/src dep
$(MAKE) -C game/src
@touch db/src/Depend
$(MAKE) -C db/src dep
$(MAKE) -C db/src
@echo "--------------------------------------"
@echo "Butun Derleme bitti"
@echo "--------------------------------------"
clean:
$(MAKE) -C liblua clean
$(MAKE) -C libsql clean
$(MAKE) -C libgame/src clean
$(MAKE) -C libpoly clean
$(MAKE) -C libthecore/src clean
Makefile:
MAKE = gmake
CC = g++9
INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
GCC_VERSION = 4
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
#SVN_VERSION = $(shell svn info |grep Revision: |cut -c11-)
SVN_VERSION = $(shell cat ../../__VERSION__)
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
TARGET = $(BINDIR)/db_r$(__VERSION__)
LIBS = -pthread -lm -lmd -lc++
CFLAGS = -m32 -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -pthread -fno-strict-aliasing -D_THREAD_SAFE
CFLAGS += -Wno-deprecated-declarations -Wno-format-truncation -Wno-nonnull-compare
CXXFLAGS = -std=c++11 -Wl,-rpath=/usr/local/lib/gcc9
# boost
INCDIR += -I/../../../Extern/include/boost
#Project Library
INCDIR+= -I/local/include
LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib
LIBS += -lthecore -lsql -lpoly -lgame -lm
#MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a
#OpenSSL
LIBS += -lssl -lcrypto
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 Dosya Olustu $(TARGET) ...
@$(CC) $(CFLAGS) $(CXXFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET)
@touch version.cpp
$(OBJDIR)/%.o: %.cpp
@echo -e "\033[0;32m [UA] \033[0m \033[0;33m Derleniyor:\033[0m" $<
@$(CC) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
$(OBJDIR)/version.o: version.cpp
@$(CC) $(CFLAGS) $(CXXFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
@echo -e "\033[0;32m [UA] \033[0m \033[0;33m Derleniyor:\033[0m" $<
$(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
Game/src/Makefile
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)
#SVN_VERSION = $(shell svnversion -n .)
SVN_VERSION = $(shell cat ../../__VERSION__)
P4_VERSION = $(shell cat ../../__VERSION__)
CC = g++9
INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = OBJDIR
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
# Standard Setting
LIBS = -pthread -lm -lmd -lc++
# Removed -fno-rtti
CFLAGS = -g -Wall -O2 -m32 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -D__SVN_VERSION__=\"$(SVN_VERSION)\"
CFLAGS += -Wno-deprecated-declarations -Wno-format-truncation -Wno-sign-compare -Wno-nonnull-compare
CFLAGS += -Wno-int-in-bool-context -Wno-stringop-truncation -Wno-address
CFLAGS += -fstack-protector-all
CXXFLAGS = -std=c++11 -Wl,-rpath=/usr/local/lib/gcc9
# boost
INCDIR += -I../../../Extern/include/boost
# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
../../../Extern/lib/libjasper.a\
../../../Extern/lib/libpng.a\
../../../Extern/lib/libtiff.a\
../../../Extern/lib/libjbig.a\
../../../Extern/lib/libmng.a\
/usr/lib/liblzma.a\
../../../Extern/lib/liblcms.a\
../../../Extern/lib/libjpeg.a
#LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg
# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a /usr/local/lib/libzstd.a
# Miscellaneous external libraries
# INCDIR += -I/../../Extern/include
# LIBDIR += -L/../../Extern/lib
LIBS += ../../../Extern/lib/libcryptopp.a
LIBS += -lcryptopp
# HackShield
INCDIR += -I../../libhackshield/include
LIBDIR += -L../../libhackshield/lib
LIBS += -lanticpxsvr
# XTrap
INCDIR += -I../../libxtrap/include
# openssl
INCDIR += -I/usr/include
LIBDIR += -L/usr/local/lib
LIBS += -lunwind -lssl -lcrypto
# Project Library
INCDIR += -I../../liblua/include
INCDIR += -I/usr/local/include
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib
LIBDIR += -L/usr/local/lib
LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame
USE_STACKTRACE = 0
ifeq ($(USE_STACKTRACE), 1)
LIBS += /usr/local/lib/libexecinfo.a
endif
TARGET = $(BINDIR)/game_r$(SVN_VERSION)_$(PLATFORM)
CFILE = minilzo.c
CPPFILE = BattleArena.cpp\
FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp
COBJS = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
MAINOBJ = $(OBJDIR)/main.o
MAINCPP = main.cpp
#TESTOBJ = $(OBJDIR)/test.o
#TESTCPP = test.cpp
#TEST_TARGET = $(BINDIR)/game_r$(SVN_VERSION)_striped
# default: $(TEST_TARGET)
# @strip $(TEST_TARGET)
default: $(TARGET)
$(OBJDIR)/minilzo.o: minilzo.c
@$(CC) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
@echo compile $<
$(OBJDIR)/version.o: version.cpp
@$(CC) $(CFLAGS) $(CXXFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__P4_VERSION__=\"$(P4_VERSION)\" -c $< -o $@
@echo compile $<
$(OBJDIR)/%.o: %.cpp
@echo compile $<
@$(CC) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
$(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
@echo linking $(TARGET)....
@$(CC) $(CFLAGS) $(CXXFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET)
#$(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
# @echo linking $(TEST_TARGET)
# @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o ../test
clean:
@rm -f $(COBJS) $(CPPOBJS)
@rm -f $(BINDIR)/game_r* $(BINDIR)/conv
tag:
ctags *.cpp *.h *.c
dep:
makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) 2> /dev/null > Depend
sinclude Depend
libgame Makefile
Makefile:
CXX = gcc9
CC = g++9
BIN_DIR = ../lib
BIN = $(BIN_DIR)/libgame.a
GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
CFLAGS = -m32 -Wall -O2 -pipe -mtune=i686 -fno-exceptions -I../include
CFLAGS += -std=c++11
LIBS =
OBJFILES = grid.o attribute.o targa.o
default:
$(MAKE) $(BIN)
$(BIN): $(OBJFILES)
if [ ! -d $(BIN_DIR) ]; then mkdir $(BIN_DIR); fi
ar cru $(BIN) $(OBJFILES) $(LIBS)
ranlib $(BIN)
chmod 700 $(BIN)
clean:
rm -f *.o
rm -f $(BIN)
dep:
touch Depend
$(CXX) $(CFLAGS) -MM *.cc > Depend
$(OBJFILES):
$(CXX) $(CFLAGS) -c $<
include Depend
liblua config
Code:
# configuration file for making Lua 5.0
# see INSTALL for installation instructions
# These are default values. Skip this section and see the explanations below.
LOADLIB=
DLLIB=
NUMBER=
POPEN=
TMPNAM=
DEGREES=
USERCONF=
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
# --------------------------------------------------------------- Lua libraries
# Support for dynamically loading C libraries for Lua is a very important
# feature, which we strongly recommend be enabled. By default, this support is
# enabled on Windows systems (see below) but disabled on other systems because
# it relies on system-dependent code that is not part of ANSI C. For more
# information on dynamic loading, read the comments in src/lib/liolib.c .
#
# To enable support for dynamic loading on Unix systems that support the dlfcn
# interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
# uncomment the next two lines.
#
#LOADLIB= -DUSE_DLOPEN=1
#DLLIB= -ldl
#
# In Linux with gcc, you should also uncomment the next definition for
# MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option
# allows dynamic libraries to link back to the `lua' program, so that they do
# not need the Lua libraries. (Other systems may have an equivalent facility.)
#
#MYLDFLAGS= -Wl,-E
#
# On Windows systems. support for dynamic loading is enabled by default.
# To disable this support, uncomment the next line.
#
#LOADLIB= -DUSE_DLL=0
# The Lua IO library (src/lib/liolib.c) has support for pipes using popen and
# pclose. This support is enabled by default on POSIX systems.
# If your system is not POSIX but has popen and pclose, define USE_POPEN=1.
# If you don't want to support pipes, define USE_POPEN=0.
#
#POPEN= -DUSE_POPEN=1
#POPEN= -DUSE_POPEN=0
#
# The form below will probably work in (some) Windows systems.
#
#POPEN= -DUSE_POPEN=1 -Dpopen=_popen -Dpclose=_pclose
# The Lua OS library (src/lib/liolib.c) exports an interface to the C function
# tmpnam, which gcc now thinks is `dangerous'. So, support for tmpnam is
# disabled by default when compiling with gcc.
# If you still want to use tmpnam, define USE_TMPNAME=1. If you don't want to
# use tmpnam even if you're not compiling with gcc, define USE_TMPNAME=0.
#
#TMPNAM= -DUSE_TMPNAME=1
#TMPNAM= -DUSE_TMPNAME=0
# The Lua math library (src/lib/lmathlib.c) now operates in radians, unlike
# previous versions of Lua, which used degrees. To use degrees instead of
# radians, define USE_DEGREES.
#
#DEGREES= -DUSE_DEGREES
# ------------------------------------------------------------------ Lua core
# Lua uses double for numbers. To change this, uncomment and edit the following
# line, changing USE_XXX to one of USE_DOUBLE, USE_FLOAT, USE_LONG, USE_INT.
#
#NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_XXX
# When compiling Lua with gcc on a Pentium machine, using a fast rounding
# method for the conversion of doubles to ints can give around 20% speed
# improvement. To use this rounding method, uncomment the following line.
#NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FASTROUND
# For partial compatibility with old upvalue syntax, define LUA_COMPATUPSYNTAX.
# For partial compatibility with old upvalue behavior in C functions, define
# LUA_COMPATUPVALUES. Add these definitions to MYCFLAGS.
#
# -DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES
# ------------------------------------------------------------- Lua interpreter
# The stand-alone Lua interpreter needs the math functions, which are usually
# in libm.a (-lm). If your C library already includes the math functions,
# or if you are using a modified interpreter that does not need them,
# then comment the following line or add the appropriates libraries.
#
EXTRA_LIBS= -lm
# If you want to customize the stand-alone Lua interpreter, uncomment and
# edit the following two lines; also edit etc/saconfig.c to suit your needs.
# -DUSE_READLINE adds line editing and history to the interpreter. You need
# to add -lreadline (and perhaps also -lhistory and -lcurses or -lncurses)
# to EXTRA_LIBS.
#
#USERCONF=-DLUA_USERCONFIG='"$(LUA)/etc/saconfig.c"' -DUSE_READLINE
#EXTRA_LIBS= -lm -ldl -lreadline # -lhistory -lcurses -lncurses
# ------------------------------------------------------------------ C compiler
# You need an ANSI C compiler. gcc is a popular one. We do not use -ansi in
# WARN because it disables POSIX features used in the libraries.
#
CC= gcc9
WARN= -m32 -Wall
# ------------------------------------------------------------------ C options
# Write here any options you may need for your C compiler.
# If you are using gcc, -O3 will get you a faster but larger code. You can
# also add -fomit-frame-pointer to get even faster code at the cost of losing
# debug information. If you only want the shared libraries, you may want to
# add -fPIC to MYCFLAGS.
#
MYCFLAGS= -O2 -g
#MYCFLAGS= -O3 -fomit-frame-pointer # -fPIC
# Write here any options you may need for your C linker.
#MYLDFLAGS=
# ------------------------------------------------------------------ librarian
# This should work in all Unix systems.
#
AR= ar rcu
# If your system doesn't have (or need) ranlib, use RANLIB=true.
# On some systems, "ar s" does what ranlib would do.
#
RANLIB= ranlib
#RANLIB= ar s
#RANLIB= true
# ------------------------------------------------------------------ stripper
# This should work in all Unix systems, but you may want to add options.
#
STRIP= strip
# ------------------------------------------------------------------ install
# Locations for "make install". You may need to be root do "make install".
#
INSTALL_ROOT= ~/lua-5.0
INSTALL_BIN= $(INSTALL_ROOT)/bin
INSTALL_INC= $(INSTALL_ROOT)/include
INSTALL_LIB= $(INSTALL_ROOT)/lib
INSTALL_MAN= $(INSTALL_ROOT)/man/man1
# You may prefer to use "install" instead of "cp" if you have it.
# If you use "install", you may also want to change the permissions after -m.
#
INSTALL_EXEC= cp
INSTALL_DATA= cp
#INSTALL_EXEC= install -m 0755
#INSTALL_DATA= install -m 0644
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
V=5.0
BIN= $(LUA)/bin
INC= $(LUA)/include
LIB= $(LUA)/lib
INCS= -I$(INC) $(EXTRA_INCS)
DEFS= $(NUMBER) $(EXTRA_DEFS)
CFLAGS= $(MYCFLAGS) $(WARN) $(INCS) $(DEFS)
# (end of config)
libpoly/Makefile
Makefile:
CXX = g++9
BIN = ./libpoly.a
GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
CFLAGS = -m32 -Wall -O2 -pipe -fno-exceptions -fno-rtti
CFLAGS += -std=c++11
LIBS =
OBJFILES = Base.o Poly.o SymTable.o Symbol.o
default:
$(MAKE) $(BIN)
$(BIN): $(OBJFILES)
ar cru $(BIN) $(OBJFILES) $(LIBS)
ranlib $(BIN)
chmod 700 $(BIN)
clean:
rm -f *.o
rm -f $(BIN)
dep:
touch Depend
$(CXX) $(CFLAGS) -MM *.cc > Depend
$(OBJFILES):
$(CXX) $(CFLAGS) -c $<
include Depend
libsql Makefile
Makefile:
#CXX = distcc i386-obrien-freebsd5-g++
CXX = g++9
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)
SVN_VERSION = $(shell svnversion -n -c . | cut -d':' -f2)
BIN = ./libsql.a
IFLAGS = -I/usr/local/include/
CFLAGS = $(IFLAGS) -m32 -Wall -O2 -pipe -D_THREAD_SAFE -fno-exceptions
CFLAGS += -std=c++11
LIBS =
OBJFILES = AsyncSQL.o Semaphore.o Tellwait.o Statement.o
default:
$(MAKE) $(BIN)
$(BIN): $(OBJFILES)
ar cru $(BIN) $(OBJFILES) $(LIBS)
ranlib $(BIN)
chmod 700 $(BIN)
clean:
rm -f *.o
rm -f $(BIN)
dep:
touch Depend
$(CXX) $(CFLAGS) -MM *.cpp > Depend
$(OBJFILES):
$(CXX) $(CFLAGS) -c $<
sinclude Depend
Makefile:
CC = g++9
BIN_DIR = ../lib
BIN = $(BIN_DIR)/libthecore.a
INCLUDE = ../include
GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
CFLAGS = -m32 -Wall -O2 -pipe -g -I$(INCLUDE)
CFLAGS += -std=c++11
LIBS =
OBJFILES = socket.o fdwatch.o buffer.o signal.o log.o utils.o \
kstbl.o hangul.o heart.o main.o tea.o des.o gost.o memcpy.o
default:
$(MAKE) $(BIN)
$(BIN): $(OBJFILES)
if [ ! -d $(BIN_DIR) ]; then mkdir $(BIN_DIR); fi
ar cru $(BIN) $(OBJFILES) $(LIBS)
ranlib $(BIN)
chmod 700 $(BIN)
clean:
rm -f *.o
rm -f $(BIN)
dep:
$(CC) $(CFLAGS) -MM *.c > Depend
$(OBJFILES):
$(CC) $(CFLAGS) -c $<
memcpy: memcpy.o utils.o log.o
$(CC) $(CFLAGS) -c -D__MAIN__ memcpy.c
$(CC) $(CFLAGS) -o memcpy memcpy.o utils.o log.o
include Depend
Last edited: