Reboot 772 Posted February 19, 2015 Share Posted February 19, 2015 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hi friends, today I'll show you how to create your own makefile , Makefile libgame.a BIN = ../libgame.a CXX = g++ CFLAGS = -Wall -O2 -pipe -mtune=i686 OBJFILES = grid.o attribute.o targa.o ###################################################################### default: @echo 'Compiling grid.cc'; $(CXX) $(CFLAGS) -c grid.cc @echo 'Compiling attribute.cc'; $(CXX) $(CFLAGS) -c attribute.cc @echo 'Compiling targa.cc'; $(CXX) $(CFLAGS) -c targa.cc @echo 'Create library'; ar cru $(BIN) $(OBJFILES) @echo 'Compiling static'; ranlib $(BIN) @echo 'Delete .obj files'; rm -f *.o Makefile libpoly.a BIN = ../libpoly.a CXX = g++ CFLAGS = -Wall -O2 -pipe -mtune=i686 -fno-exceptions -fno-rtti ######################################################################################################## OBJFILES = Base.o Poly.o Symbol.o SymTable.o default: @echo 'Compiling Base' ; $(CXX) $(CFLAGS) -c Base.cc @echo 'Compiling Poly' ; $(CXX) $(CFLAGS) -c Poly.cc @echo 'Compiling Symbol' ; $(CXX) $(CFLAGS) -c Symbol.cc @echo 'Compiling SymTable' ; $(CXX) $(CFLAGS) -c SymTable.cc @echo 'Create library static'; ar cru $(BIN) $(OBJFILES) @echo 'Compiling'; ranlib $(BIN) @echo 'Delete .obj files'; rm -f *.o Makefile libsql.a BIN = ../libsql.a CXX = g++ CFLAGS = -Wall -O2 -pipe -mtune=i686 -D_THREAD_SAFE -fno-exceptions ######################################################################################################## OBJFILES = AsyncSQL.o Semaphore.o Tellwait.o Statement.o INCDIR = -I/src_reboot_def/extern/mysql_5.6.22 default: @echo 'Compiling AsyncSQL'; $(CXX) $(INCDIR) $(CFLAGS) -c AsyncSQL.cpp @echo 'Compiling Semaphore'; $(CXX) $(INCDIR) $(CFLAGS) -c Semaphore.cpp @echo 'Compiling Tellwait'; $(CXX) $(INCDIR) $(CFLAGS) -c Tellwait.cpp @echo 'Compiling Statement'; $(CXX) $(INCDIR) $(CFLAGS) -c Statement.cpp @echo 'Create library static'; ar cru $(BIN) $(OBJFILES) @echo 'Compiling'; ranlib $(BIN) @echo 'Delete .obj files'; rm -f *.o Makefile libthecore.a BIN = ../libthecore.a CXX = g++ CFLAGS = -Wall -O2 -pipe -mtune=i686 -g ######################################################################################################## 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: @echo 'Compiling socket' ; $(CXX) $(CFLAGS) -c socket.c @echo 'Compiling fdwatch'; $(CXX) $(CFLAGS) -c fdwatch.c @echo 'Compiling buffer' ; $(CXX) $(CFLAGS) -c buffer.c @echo 'Compiling signal' ; $(CXX) $(CFLAGS) -c signal.c @echo 'Compiling log' ; $(CXX) $(CFLAGS) -c log.c @echo 'Compiling utils' ; $(CXX) $(CFLAGS) -c utils.c @echo 'Compiling kstbl' ; $(CXX) $(CFLAGS) -c kstbl.c @echo 'Compiling hangul' ; $(CXX) $(CFLAGS) -c hangul.c @echo 'Compiling heart' ; $(CXX) $(CFLAGS) -c heart.c @echo 'Compiling main' ; $(CXX) $(CFLAGS) -c main.c @echo 'Compiling tea' ; $(CXX) $(CFLAGS) -c tea.c @echo 'Compiling des' ; $(CXX) $(CFLAGS) -c des.c @echo 'Compiling gost' ; $(CXX) $(CFLAGS) -c gost.c @echo 'Compiling memcpy' ; $(CXX) $(CFLAGS) -c memcpy.c @echo 'Create library static'; ar cru $(BIN) $(OBJFILES) @echo 'Compiling'; ranlib $(BIN) @echo 'Delete .obj files'; rm -f *.o I can not understand why do some makefile so YMIR compilcate. I forgot to tell you, .o files have removed. File depend removed. @echo 'Compiling grid.cc' Instead of compiling grid ask what message you want If you have errors, leave reply. If you want to make simple makefile, organized, easy to modify. And for the rest of the library. (Libsql, libthecore etc.) 2 1 12 Link to comment Share on other sites More sharing options...
Reboot 772 Posted February 21, 2015 Author Share Posted February 21, 2015 Update. Added: Libthecore.a , libsql.a , libpoy.a , libgame.a Libserverkey.a you can delete that folder Link to comment Share on other sites More sharing options...
ThePooter 4 Posted February 22, 2015 Share Posted February 22, 2015 OFFİCİAL 34K SOURCE HOW MUCH ? THANK YOU Link to comment Share on other sites More sharing options...
Reboot 772 Posted February 22, 2015 Author Share Posted February 22, 2015 OFFİCİAL 34K SOURCE HOW MUCH ? THANK YOU I don't know. )))))) Link to comment Share on other sites More sharing options...
kinqilleqal 0 Posted March 7, 2015 Share Posted March 7, 2015 Thanx.. Link to comment Share on other sites More sharing options...
Honorable Member NoFr1ends 751 Posted March 7, 2015 Honorable Member Share Posted March 7, 2015 A better way is to use cmake. But thanks. Kind regards Chuck Link to comment Share on other sites More sharing options...
Recommended Posts