Raised This Month: $32 Target: $400
 8% 

Solved Compiling metamod to much size file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-02-2017 , 02:25   Compiling metamod to much size file
Reply With Quote #1

Hi AM users, im trying to recompile metamod-p1.37 latest from git , for windows im succeding just fine, using MSVC 2010 SP1 but the problem is under linux using only "make linux" outputs to high filesize over 1MB and it outputs in debug and not release version, i dont understand how to use the optimizations

Source: https://sourceforge.net/p/metamod-p/...i/master/tree/

hot to use
PHP Code:
# Note! About gcc optimization levels.
#  There is four optimization levels:
#    -O0    No optimizations.
#    -O1    Optimize for smaller size.
#    -O2    Optimize for speed without increasing size (alot).
#    -O3    Optimize for speed, can result much greater filesize.
#  Levels higher -O3 (-O6 for example) is threaded as -O3.
#  See differences at "http://gcc.gnu.org/" (look for link to 'gcc manual').

# original safe optimization, from valve Makefile
#CCOPT = -O1 -ffast-math -funroll-loops \
#    -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
#    -malign-jumps=2 -malign-functions=2

# safe optimization, adapted from adminmod Makefile
#CCOPT = -m486 -O6 -ffast-math -funroll-loops \
# -fexpensive-optimizations -malign-loops=2  -malign-jumps=2 \
# -malign-functions=2 -Wall

# full optimization, adapted from adminmod Makefile
# "WONT WORK WITH omit-frame-pointer"?
# - disable (unneeded) C++ exceptions and rtti code to save some space ?

CCOPT = $(CCO) $(CCOPT_ARCH) -fno-exceptions -fno-rtti

# optimization level; overridden for certain problematic files
CCO = -O2 -fomit-frame-pointer -funsafe-math-optimizations
CCO 
+= -flto -fvisibility=hidden 
A lot of tutorials for compiling / recompiling / metamod / amxx, are missing from this forums why ?
Im using the default makefile from reposory

Windows output 127kb
Linux output 1,5 MI/o

why so ?
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 03-23-2017 at 17:12.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-02-2017 , 04:40   Re: Compiling metamod to much size file
Reply With Quote #2

Uncomment one of those 2 CCOPT assignments I guess. You could also post compiler output.
klippy is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-02-2017 , 04:51   Re: Compiling metamod to much size file
Reply With Quote #3

Nope, solved!

Just used to compile command
Code:
make linux_clean opt

btw, thanks.
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 03-02-2017 at 04:52.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode